Tag Info

Hot answers tagged

2

Now that you have explained your issue better and I see your question actually has nothing to do with getting the title and URL, I can make a suggestion. Load the web properties in a batch. Then use a single execute query after the while. Anonymous functions embedded just to keep lines of code down. var ctx = SP.ClientContext.get_current(); var ...


2

In order to get value from Web.AllProperties property (PropertyValues type) you could use the following ways: FieldValues property Item property Example: get Web AllProperties var context = new SP.ClientContext.get_current(); var web = context.get_web(); var props = web.get_allProperties(); context.load(props); ...


2

With External lists the BDC Identity IS what you want you want in lieu of the traditional list item ID. This is actually in an MSDN reference that I am failing to find to provide a link too. I was still dealing with the problem of each BDC Identity being duplicates - which is why the getSelectedItems was not working. We resolved this by correcting the ...


2

Use AppCatalog class for this. Proof of concept below: class StackExchangeProof { static void Main(string[] args) { var login = "admin@yourdomain.onmicrosoft.com"; var password = "YourHardP@ssw0rd"; var url = "https://yourdomain.sharepoint.com"; var creds = new SharePointOnlineCredentials(login, ...


2

About the first one: since it is a note field, I suppose that that is the actual content of the field. SharePoint automagically formatted your text when you inserted it into the list. About the second one. Again, expected. The user will be returned as an instance of the FieldUserValue class. Cast it to read the actual info. For example: //Note: will give ...


1

For the user you need to get the LookupValue property and then use toString(). objFieldUserValue.LookupValue.ToString(); Microsoft.SharePoint.Client.FieldUserValue Title For the NoteField try to get the property Text. NoteField properties


1

Using non-Public methods is never "supported" by the SharePoint Product Group (for example, a PowerShell script that reads a value from a private property). While I'd be more comfortable running a PowerShell script to read non-public properties, doing so in a product (be it internal or external) is not something I would do as I could not get Microsoft ...


1

[Applies to SP 2010] You need to make sure that the SP.js file is loaded before executing the function. Taken from the MSDN: SP.SOD.execute Executes the specified function in the specified file with the optional arguments. SP.SOD.executeOrDelayUntilScriptLoaded Executes the specified function after the file specified has been loaded; ...


1

If this is an app or anything outside of a SharePoint page you need to load document.write('<script src="' + spHostUrl + '/_layouts/15/MicrosoftAjax.js"><\/script>') document.write('<script src="' + spHostUrl + '/_layouts/15/sp.runtime.js"><\/script>') document.write('<script src="' + spHostUrl + ...


1

Since it an ItemUpdated it is calling the same code again and again. In Server object model we have this.EventFiringEnabled = false; to prevent the event from firing again. You may have to perform some checks to avoid the update operation recurrence. Here is a somewhat similar question: Remote Event Receiver on updated will be fired multiple time


1

Choice JS or Server OM depends on you. For example if you think that in the future you will need the same code in SP Online, in that case is better write the code in JS. The main object for that is PeopleManager. This is an example of JS code: var personProperties; // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs. ...



Only top voted, non community-wiki answers of a minimum length are eligible