Blogroll

Friday, March 21, 2014

Access denied by Business Data Connectivity - BCS - Resolved

Create an External Content type based on backend SQL Server Database and create an External list based on it.

Open the Site in SharePoint Designer 2010: http://portal.contoso.com


Provide username and password in the promotion for open the site


Opening the site http://portal.contoso.com by communicating with the Web service


Retrieving External Content type Report



Create new external content type: Define General Properties for External Content type


Content type name: Contact; Name Space: http://portal.contoso.com; Office Item Type: Contact; Enable offline Sync to External list 

External System: Click here to discover external data sources and define operations 

Add Connection 

Managing Connections to external data sources and the operations for this external content type

External Data Source Type Selection: SQL Server -> Open the SQL Server Connection


SQL Server Connection: Populate the Database Server and Database name in the box


 Navigate to the appropriate database (AdventureWorks) and scroll through the required table (Contact)  

Table: Verify the available operations for that table

Operations for External content type means action that can be performed on the data associated with the external system -> Click on Create all Operations


Specify the parameters for the Operation


Example: Get the “Last Name” parameter-> Office property: Last Name; Check the Show in Picker box.


Filter Parameter Configuration


Add Filter Parameter: Add a Limit filter to the Query Item List Operation


Add Filter Type: Limit (Strongly Recommended to add a filter of type ‘Limit’ for this operation type)  



Filter Filed: None; Default value given as “100” for the limit filter type

Save the Content type to the Business Data Connectivity Metadata Store


Create an External List for the External Content type


External List : Business Contacts ; System Instance : AdventureWorks

External List: Business Contacts Created


Set Business Connectivity Store Permissions

List and Libraries -> External List-> Business Contacts -> Open Preview in Browser


Access is being denied by Business Data Connectivity Service (Reason: There is no permission for viewing this list)


Set the permission: Open CA->App mgmt. ->Manage Service Applications-> Business Data Connectivity Service->Manage->Set Metadata Store Permissions 


 Add Contoso\Administrator and feed all the (Edit, Execute, Selectable in Clients, Set Permissions) permission to the user.

Propagate permissions to all BDC Models, External Systems and External Content types in the BDC Metadata Store.


Work with External Content type in the Browser: Navigate to the http://portal.contoso.com


List will display with the no permission error now


Edit Item: Edit any of the lists and include any data in the list.


Example: Data Included in one of the List




Product Applies To:
- SharePoint 2010
- SharePoint 2013

Wednesday, March 19, 2014

The site template requires that the Feature be installed in the farm

I was facing one issue while creating a new site from site template in our customer environment. This site was created in our local environment and I saved it as a template.

Below is the screenshot for the error what customer are facing.

After investigating with this feature id, I found that, there is a hidden feature named “WACustomReports” at site collection label, that need to be deactivated before saving the site as template.

Error Message: The site template requires that the Feature be installed in the farm or site collection. Troubleshoot issues with Microsoft SharePoint Foundation.

Resolution is very simple:
Please activate this feature "Web Analytics Customize Reports functionality" on the root site where you are trying to create the site based on this template. Here is the exact name - WACustomReports

OR Here is the command to activate that feature (Any feature which is missing): Enable-SPFEATURE WACustomReports –URL http://sitecollectionURL

But here is the END USER reply that I received from the end user:
“In our environment, we don’t have any access. We are only sharing the templates with instructions. Client is having only Site Collection Admin rights, not central admin rights. That’s why I deactivated this HIDDEN feature from our dev environment. Took a backup and will share with customer today.”

So bottom line: No direct access to do these things which has suggested above.

So what’s the next action plan?

Here is the resolution for this-

- Save the wsp to your desktop

- Renamed it to the .CAB file

- Extract the contents

- You will see four folders underneath ( adminListInstances, adminModules, adminPropertyBags and adminWebTemplate)

- Go for adminWebTemplate

- Go inside the "admin" folder

- You will see "ONET.XML"

- Edit with notepad

- Control F and search for WACustomReports (please refer the following screenshot) to get more clarity
- remove the lines which are for the above feature

- Save the notepad.

- Repackage the files again and save as .WSP

How to repackage it? Here are the steps:
1.   Rename WSP file to CAB and extract all the files
2.   Modify the necessary files
3.   Rebuild the correct directory structure for the solution
4.   Copy the files into that directory structure (in the right place)
5.   Create a DDF file indicating name and location of all files to be in WSP file
6.   Run MakeCab using created DDF file to create cab, and then rename cab to WSP

Reference of MakeCab:
- See more at: http://sharepointknowledgebase.blogspot.co.uk/2014/04/the-site-template-requires-that-feature.html#.VEP8jiJ4pD0

Design and Publish the Infopath form - SharePoint 2010 / SharePoint 2013

InfoPath Form Designer: 
Software application for Designing, distributing, submitting and filling the form which contains hierarchical tree view of folders and data fields. It is used to create and save the information on a web server when hosted on SharePoint.

Create a Blank Form : InfoPath Designer -> File -> New -> Blank Form.
E.g. SharePoint Site Request Form




Add 3 Sections in the Blank Form Field -> Get Sections option from the Control Tool Properties

Insert 3 Separate tables from the INSERT (Navigation Tool bar) option to the sections




Populate the required label name and assign the necessary control field to the labels from the Control Tool Properties.



Right Click on the Filed Properties -> Assign Unique name for Separate field.
For People/Group Picker field Properties -> Specify a SharePoint Site to query for People and Groups.



For the Date/Time Filed, Insert Formula as today() (on Insert Function option) -> It will display today’s date on the form.



For every Drop-Down List type Controls -> Specify the needed Choice value on the Property box.

Don’t forget to click on “Cannot be blank” option which means this field in the form should be filled up with the values.

E.g. 1: Location: Asia, Europe…



E.g. 2: Site Template: Blank, Team…..




Add Button Option in the Form for Submit the Request



Create New Rule for the Submit Button -> Rule Type: Action -> Run these action: Add -> Submit data



Add New Data Connection to submit the form: Click on Submit Data to document Library on SP Site



Specify the Document Library name and File name for the Data.


Publish the Form to a Document Library




Click on File -> Publish -> SharePoint Server -> Publishing Wizard will open
Specify the Location of SharePoint Site



Click on “Enable this form to be filled out by using a browser”



Click on the Radio button for “Document Library” to publish the form as a template in a document library.

On this step, create a new document library or Update the form template in an existing document library based on the need.



Click on Next and in the final dialog box; verify the Form information and Publish.

 By using Design Option in the InfoPath Designer, Design your Form as like this!!!!!


ShareThis

snow flakes

blogger widgets Blogspot Tutorial

LinkWithin

Related Posts Plugin for WordPress, Blogger...