Hot answers tagged

4

It looks like you omitted parentColumn and childColumn. This needs to be present for the script to work, otherwise it doesn't know what fields on the form to manipulate. parentColumn The DisplayName of the parent column in the form childColumn The DisplayName of the child column in the form Correct code should be: ...


4

Mark, See if this can help you. If you are writing the custom code this can set you the starting point.


4

MONTH( [MyDate] ) will return 1 for January, then use the SharePoint version of the switch/case statement: =CHOOSE( MONTH([MyDate]) , 30 , 60 , 60 , 60 , 60 , 60 , 60 , 60 , 60 , 60 , 60 , 60 ) remember: if you are going to work with Dates in JavaScript then January = 0 and December = 11 All SharePoint functions: www.viewmaster365.com/functions ...


3

Search is a pretty resource intensive component of a SharePoint farm. If the system has a lot of content to process/crawl and this impacting your daily operations then you should check that continuous crawling is disabled and then schedule your crawling for off hours. It sounds a bit like you may not have enough RAM to begin with. 12 GB seems like a fair ...


3

CAML joins, to my knowledge, only work on the server side. To mimic that on the client side, you have to make several calls, storing the results in objects or arrays, parsing through that, and making further calls. This isn't a limitation of SPServices, but the underlying web services themselves.


3

Once you have changed the credentials, just restart the timer service. This will reset the credentials and apply the new ones. Restating the service will not create any problems.


3

You can go through the Url : https://technet.microsoft.com/en-us/library/ee704549.aspx or you can apply this: $farm = Get-SPFarm $farm.TimerService.Instances | foreach { $_.Stop(); $_.Start(); }


3

Eric Alexander is right on both of his points, but I don't think that's why you're getting the error that SPServices is undefined. Is jQuery getting loaded somewhere else on the page? I have seen this happen when there's another link to load jQuery somewhere lower on the page than the link to SPServices. Then jQuery re-loads itself and loses the ...


3

Try this instead. I've also fixed some errors in your code. _spBodyOnLoadFunctionNames.push("Init"); function Init(){ alert("Before SPCascade"); $().SPServices.SPCascadeDropdowns({ relationshipList: "List 1", relationshipListParentColumn: "List 2", relationshipListChildColumn: "Title", parentColumn: "List 2", ...


2

You need to delay for sp.js I guess for using $().SPServices. In SharePoint 2010 ExecuteOrDelayUntilScriptLoaded(functionTobeCalledNext, "sp.js"); In SharePoint 2013 SP.SOD.executeFunc('sp.js', function () { // code goes here }); Ignore jQuery document ready. It doesn't ensure that sp.js is loaded.


2

If the list is located on the same site on which the JavaScript is running, you don't need to use SPServices and jQuery, you can use the built-in JavaScript client object model like so: <table id="Announcements"></table> <script> ExecuteOrDelayUntilScriptLoaded(getMyListData,"SP.JS"); function getMyListData(){ var listName = ...


2

You might want to try clearing the configuration cache. The steps for doing this are posted on a few places on the web, here's a link to one: http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx The steps are formatted and it'll take too long to copy and paste and reformat here, but essentially - ...


2

you are providing listID instead of List Name and could be the source of the issue listName: "{17C2EC72-7229-445D-87A1-38AE11051906}", //give list name here


2

The function you are asking about is SPFilterNode, and it's part of SPServices. The reason the function even exists is to help with cross-browser compatibility. Browsers other than IE won't work with the z:row namespace (or any other with a colon) properly. By providing SPFilterNode - based on Steve's excellent work - I'm able to give you cross-browser ...


2

In a document library, you'd want to use the ows_FileRef field to pull the URL of the file. This will get you a value like, /managedpath/site/library/filename.jpg, which is what I think you're after here.


2

You can expand the user field using following code CAMLQueryOptions: "<QueryOptions><ExpandUserField>True</ExpandUserField></QueryOptions>" Now you can extract username in success method by using string manipulation.


2

Yes you need to place following query option CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope="Recursive"/></QueryOptions>"


2

The whole Or section looks wrong, try using BIWUG CAML Designer to craft your query, then use that in your SPServices function. Also, you need to use the internal field names, not the web service returned fields (Description1 vs ows_Description1 etc). http://www.biwug.be/resources Typical nested Ors would look like this: <Where> <Or> ...


2

I don't think you use the correct columns' names. You're using the names as seen by the SharePoint search engine, not the internal names of the fields. For instance, ows_Title should be Title, etc. On the other side, I don't think the nested OR are wrong here, they're just up-side-down.


2

It appears I was simply missing accurate domain information. My "user" variable changed to include the domain name and user name combined allowed me to finally remove a user from the group. function deleteClick(arrayPos){ var group = userArray[arrayPos][0]; //group name var user = userArray[arrayPos][1]; //user.name var domain = ...


2

You can write an event receiver for your list that handles permissions of the item. You should use ItemAdded event receiver. Some links event receivers: https://msdn.microsoft.com/en-us/library/office/ms437502(v=office.14).aspx https://msdn.microsoft.com/en-us/library/office/ms453149(v=office.14).aspx and link about managing permissions ...


2

You would need to store the domain\username in a variable and make a call to the GetUserProfileByName operation to then get the managers name. http://spservices.codeplex.com/wikipage?title=GetUserProfileByName $().SPServices({ operation: "GetUserProfileByName", async: false, AccountName: yourmanagerVariable, completefunc: function (xData, Status) { ...


2

The best way to list sites a user has access to is do a search for: contentclass:STS_Web If you really really want to implement the slow way then you need to use SPSecurity.RunWithElevatedPrivileges as you'll come across web applications/site collection the current user doesn't have access to


2

Yes, SPServices wraps the Lists web service: https://spservices.codeplex.com/wikipage?title=Lists Which includes AddList: https://msdn.microsoft.com/en-us/library/lists.lists.addlist.aspx Once the list is created, you would use UpdateList to add fields or modify other properties: ...


2

Your solution with SPServices is just ok. You should use jQuery to parse data and you could use selectors: var picker = $().SPServices.SPFindPeoplePicker({ peoplePickerDisplayName: whatDisplayName //your picker control field's display name }); var data = picker.row.find("div[id='divEntityData'] div").attr("data"); var xml = $(data);//accepting data by ...


2

Make a GET request to the following URL, It will return all folders /_api/Web/GetFolderByServerRelativeUrl('" + libraryRelativeUrl + "')/Folders?$select=Name,ServerRelativeUrl Using jQuery function getFolders(libraryRelativeUrl) { var queryUrl = "/_api/Web/GetFolderByServerRelativeUrl('" + libraryRelativeUrl + ...


1

I found the answer myself, the issue is mentioned Here by Marc. I should NOT use $(xData.responseXML).find("[nodeName='z:row']").each(function() instead, have to use $(xData.responseXML).SPFilterNode("z:row").each(function() its because the jQuery version 1.8.2 doesn't support nodeName='z:row' so,we must use SPFilterNode("z:row").each(function) ...


1

I faced the same issue and the reason was that the FIM services were stopped. Forefront Identity Manager Service & Forefront Identity Manager Synchronization Service. If these services are not running, you won't be able to see the connections that you already configured. Check the services and start them again. Sometimes, FIM Service does not get ...


1

I have a similar problem, I decided that's: Get UserNameAccount by $().SPServices.SPGetCurrentUser Get with this account item from list by ID var currentUsername = $().SPServices.SPGetCurrentUser({ fieldName: "Name" }); getUserInfoFromSPList(currentUsername); // call function with parameter userAccount function ...


1

jQuery deferred object can solve your problem. https://learn.jquery.com/code-organization/deferreds/examples/ Using the above concept you can make the asynchronous calls work in synchronous way. Let me know if you have more questions.



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