Friday, July 29, 2016

The query cannot be run for the following DataObject: Get User Profile By Name: SharePoint 2013


I was developing a heavy InfoPath application with custom codes. The form contains around 40 data connection including external data connections, web services, etc… This form is using ‘Get User Profile By Name’ data connection which come along with the UserProfileService.asmx web services. The user profile web service url comes as follows: http://shpapp:2000/sites/Test/_vti_bin/UserProfileService.asmx

When I try to open the form in the preview mode it pops up below error message:



Error message:

The query cannot be run for the following DataObject: Get User Profile By Name
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred: A user with the account name MohamedAkb could not be found. ---> An error was encountered while retrieving the user profile.
UserCannotBeFoundAn error was encountered while retrieving the user profile.

I started search, almost all the suggestions say set the form in to full trust mode as bellow:
  • Go to File - > Form Options -> Security and Trust
  • Select Full Trust option button.




The above option is use full to deploy the form at the farm level. If the form contains VSTA code, it is must to deploy as full trust mode. This doesn’t help to resolve the user profile issue.

To resolve the user profile issue follow below steps:
  • At the create data connection wizard untick the ‘Automatically retrieve data when form is opened’ option.


  • At the form load event create a rule to query the data connection. In the rule, set the query field as Account name = DOMAIN\UserName then query the data connection.

  • Save the form and open in the preview mode. You will see no errors now. 

Thursday, July 21, 2016

Change URL of a Document Library - SharePoint 2013

After creating the document library in SharePoint 2013, sometimes you might need to change the URL of the library. You can follow below steps in the browser:
            • Open the document library
            • Go to library settings from Library tab at the ribbon
            • Click 'List, name, description and navigation' link.
Using above steps you can change only the library name, but the URL will not change.
Resolution
Using the browser there is no way to change the URL. You can do this using SharePoint Designer 2013. The steps as follows:
            • Open the SP designer and click on the 'All Files' not the 'List and Libraries'
            • Right click on the library and select 'Rename'

This will change the library name as well as the URL.

Tuesday, July 12, 2016

The Internet is Not Really Free


Lot of resources on the internet seems free. We are using it free of charge. There should be a way to the content providers to earn money. This is where the digital footprint information is used for the business purposes. Though the online services seems free, those are not actually free of charge.
Tracking the user information, customizing the content and using the analyzed data becoming a growing business in internet. There are specialized people in this area, they observe and collect the data and link with other sources. Mainly marketers and advertiser use this technique to promote their product.
There is no direct cost involve on the internet to watch a video, read a blog, view a web site, etc. Though the users are not paying directly, they are paying indirectly. As described above the content providers need money to maintain their services, to their servers, their database storages and network facilities. The content providers earn money indirectly to run their services.
The question is how the content providers can earn money indirectly from the users. The service is funded by monetizing information about the internet user, about his preferences, his interests and his social circle, basically the information collected in the form of digital footprint. If the user pay a subscription or not, these information will be collected and used for various purposes.
The users may notice that when they visiting a web page there are so many advertisement all over the pages. Most of the advertisements are matching with the users’ preferences. How the content provider predict the correct advertisement is from the collected digital footprint information. For example a user searching for a shirt in an online store and he is interested on it. This data will be stored, next time the user log in to a web page he will notice the shirt advertisements are popping up at the page.
To select the right advertisement on the page, the marketers and the advertisers may choose based on the demography, language, right product, the correct time and other factors; that will help to target the consumers effectively.

Some intermediate parties playing a role between the user and the advertisement companies. The intermediate parties collect user information such as user profile, preferences, language and single sign-on data, and they analyze and process the information and provide to advertisement companies. There may be no direct connection between the user and the advertisement parties, the connection resides through intermediate parties.