Hot answers tagged

4

You cannot change the parent content type of a content type: The Parent property is read-only. The content type ID is prefixed with the parent content type's ID. See explanation here which is for SP2010 but it works the same for SP2013. You have to basically re-create the content types using the correct parent from the start.


3

How are you debugging your webpart? Do you select Debug option from the solution explorer or do you attach to the w3wp process? If you are attaching to the w3wp process, I've seen a lot of developers attaching to all available w3wp processes. It would be more optimal to attach to the specific process for your application. Can you check your system resource ...


3

SPUser singleUser = new SPFieldUserValue(item.Web, item["Single User"] as string).User; SPUser[] multipleUsers = ((SPFieldUserValueCollection)item["MultipleUsers"]).Cast<SPFieldUserValue>().Select(f => f.User); I'm not sure why one user is stored as a string, but multiple users are stored as a specific object; it may also not be consistent in ...


2

You have to use attach to the the process from the Debug Menu.


2

You had added a folder inside layouts folder but did not added anything in that folder under layouts, So sometimes it will not create folder under 15 Hive (\15\\TEMPLATE\\LAYOUTS). Please add any sample text file in the folder GPIntegrationLogs which is available under the layouts folder. You will get the GPIntegrationLogs folder with that text file in it ...


1

To get the last record of the list you have to take Ascending='False' in CAML Query. <OrderBy> <FieldRef Name='EnquiryNumber' Ascending='False' /> </OrderBy> <RowLimit>1</RowLimit>


1

My guess would be that the Assigned to field won't accept the user group's ID and would need another property. So I would suggest this: After the GetDynamicValueProperties activity, add a LookupSPGroup activity In the Properties of this activity in the GroupPrincipalId property add your OwnerId variable. Set the result property to any variable of your ...


1

Follow Method that takes a SPWeb object and a SPUser object. SPServiceContext serverContext = SPServiceContext.GetContext(web.Site); UserProfileManager profileManager = new UserProfileManager(serverContext); string userString = user.LoginName.ToString(); UserProfile userProfile = profileManager.GetUserProfile(userString); if (userProfile != null) ...


1

You can use below code snippet to follow a site //GET USER PROFILE MANAGER SPServiceContext serverContext = SPServiceContext.GetContext(siteobject); UserProfileManager profileManager = new UserProfileManager(serverContext); UserProfile profile = profileManager.GetUserProfile(loginName); if (profile != null) { //Social following manager object for the ...



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