New answers tagged

0

Here is the code to set the welcome page: var context = null; var web = null; var rootFolder = null; var welcomePage = 'SitePages/Home.aspx'; SetWelcomePage(); function onSuccess() { context = new SP.ClientContext.get_current(); web = context.get_web(); rootFolder = web.get_rootFolder(); context.load(web); context.load(rootFolder); ...


0

I eventually replaced SPServices with a standard ajax call. This works perfectly. $.ajax({ url: "/_api/web/lists/getbytitle('User Information List')/items?$filter=Title eq '" + employeeName + "'&$select=Department,JobTitle", method: "GET", async: false, success: function (data) { department = $(data).find('Department').text(); jobTitle = ...


0

You can get below REST method to get users from the group. GET request example: Get the users in a group executor.executeAsync({ url: "<app web url>/_api/SP.AppContextSite(@target)/web /sitegroups(7)/users ?@target='<host web url>'", method: "GET", headers: { "accept": "application/json; odata=verbose" }, success: ...


1

Please try below mentioned code. You will get the current logged in user's username & department using SPServices <script src="/Scripts/jquery-1.10.2.min.js" type="text/javascript"></script> <script src="/Scripts/jquery.SPServices-2014.02.min.js" type="text/javascript"></script> <script language="javascript" ...


1

One issue I can see is below "<Value Type='Text>11000</Value>" It should be Type='Number'


0

You can do something like that: <script> var targetListItem; var listName="js"; var itemId=1; ExecuteOrDelayUntilScriptLoaded(GetListItem, "sp.js"); function GetListItem(listName,itemId) { var clientContext = new SP.ClientContext(); var targetList = clientContext.get_web().get_lists().getByTitle(listName); ...


0

i solve above issue with help of below link. http://ecarlos.net/post/2012/10/19/Get-PeopleEditor-(PeoplePicker)-values-in-sharepoint-2010-using-SPServices.aspx basically SPFindPeoplePicker search for label name of column. if you have required field * mark next to you field name then spserivce did find column name. just remove or shift * mark from label ...


1

There have to be commas between the value pairs: [ ["EmployeeNumber", $("#tbEmployeeID").val()], ["EmployeeName", $("#tbEmployeeName").val()], ["EmployeeEmail",$("#tbEmployeeEmail").val()] ]


0

If the list item is a document then you can use the MapToIcon method of the SPUtility class if (Item.File != null) { SPUtility.MapToIcon(Web, Path.GetExtension(Item.File.Name), string.Empty, IconSize.Size16); }


1

This was a typo on my part. I was not putting the ContentType field into the pairs array as an array itself. The right way: pairs.push(['ContentType', this.get('contentTypeIdName')]); The wrong way (and how I was doing it): pairs.push('ContentType', this.get('contentTypeIdName'));


0

try the cross domain library "SP.RequestExecutor.js", and you don't need to use SPServices now, as the REST API is quite good now. https://msdn.microsoft.com/en-us/library/office/fp179927.aspx


1

I think you have to modify two parameters : parentColumn: "Type de la demande", //Printed Name childColumn: "Sous-type de la demande", //Printed Name TO parentColumn: "Cat├ęgorie", //Printed Name childColumn: "Choix", //Printed Name The problem comes from these parameters because you have to write exactly what is written on the form. In your ...


0

You can simply use the infopath way to custom a list form : And here is a tutorial that explains how to do what you want : https://www.youtube.com/watch?v=-HnLhXVQf-M



Top 50 recent answers are included