JavaScript Object Model

learn more… | top users | synonyms

0
votes
1answer
34 views

JSOM context newly created id reference when creating more than one item

I am using the COM JavaScript/jQuery to get, create & update some list items. I have two lists and every time I create a new item in one list, the newly created id is something that I want to grab ...
-2
votes
0answers
9 views

Not getting getWebRelativeFriendlyUrl using sp.publishing.js .!!(JSOM) [on hold]

I am not getting getWebRelativeFriendlyUrl using sp.publishing.js. Same for getAllParentTerms . Thanks in advance.
1
vote
1answer
24 views

consuming external web services(https) in share point hosted apps resulting cross-domain issue

We are not able to consume external web services deployed in a separate domain from sharepoint hosted apps,using jquery ajax. Thanks in advance . Thanks, HARI
0
votes
1answer
46 views

Add SP Group to folder using JSOM

Is it possible to add a SharePoint Group to a library folder using JSOM in Office 365? I'm using a script editor webpart on an aspx page to run the code. I managed to create SP Group, create folders, ...
1
vote
1answer
16 views

JSOM - ListItem from 'GetFileByRelativeUrl' returns System.ArgumentException

I'm trying to retrieve the corresponding ListItem from a page layout in the master page gallery using JSOM. I'm using the same approach that Vadim provides in this question, JSOM - get listitem by ...
1
vote
0answers
18 views

Get the last rated item in a SharePoint list

we have a SharePoint list with social rating feature enabled. On the homepage I want to display the "Latest Voted Item" of that list. Is it possible to get the last rated items in a SharePoint list ...
0
votes
2answers
37 views

JSOM and UTC conversion

I'm using client Object Model to filter a list and display an event date. When displayed I see a UTC date format. How can this be converted to UK date format using Javascript object model? Is it ...
3
votes
2answers
64 views

Client Side Rendering with Async dependencies

In my display template I want to render a field in different ways based on the user's group membership. The information about the group membership comes from an async ajax call (jsom or rest) What I ...
0
votes
0answers
7 views

Show custom list from host web

I am developing sharepoint hosted app.I have custom list on host web.Is is possible to show that custom lists default view into app's page. I want to use OOTB functionality like add ,edit and delete ...
0
votes
1answer
25 views

cannot retrieve data from lookup column

I'm trying to retrieve a lookup field using : var lookup = ($(this).attr("ows_shARePublishTo_x003a_shAReSiteUR")); Other columns seem to work fine, including another lookup column The column name ...
1
vote
2answers
61 views

Get userProfile mail by SP.FieldUserValue

What I want Simply - the user's profile information to obtain the mail adress. What I have A SP.FieldUserValue object filled with the user which mail I want to obtain. Approach MailContact: ...
0
votes
1answer
22 views

How to Get list of site collections in a web application using JSOM

I have got a requirement like want to fetch the details of all the site collections in a web application either using JSOM or .net managed client object model? Please provide me those details. ...
0
votes
1answer
35 views

Multiple Asynchronous query chaining

I have a Sharepoint 2013 application that has multiple (3) ExecuteQueryAsync calls in 3 different functions. Two of them are referring to the Project Server project context, and one is referring to ...
1
vote
0answers
18 views

How to create multiple fields using REST query

According to MSDN, we can create field like below.. $.ajax({ url: "http://<site url>/_api/web/lists(guid'da58632f-faf0-4a78-8219-99c307747741') /fields", type: "POST", data: "{ ...
1
vote
0answers
25 views

How to get Title Resource from a View with JSOM or REST?

I am able to get title/name resource from lists, content types and fields. However, I'm not able to get title resource from views. I'm not sure how well documented this is, but this is how I get ...
-1
votes
1answer
24 views

Remove User from Security Group Using JSOM

I'm trying to remove a user from a SharePoint 2010 group using JSOM, but not having much luck. I've been trying to adapt the script on this page - ...
1
vote
1answer
33 views

Error in accessing Office 365 Developer site's URL in SharePoint App [JSOM]

I have created a SharePoint App for my Office 365 Developer site. The app is throwing an error when trying to access the Site's url. var context = SP.ClientContext.get_current(); var web = ...
1
vote
0answers
41 views

Get ContentType by “internal name” through REST/JSOM

I understand content types has nothing equivalent to fields internal name, they only have Name, which is like a title. This can be changed, and alters between locales. My impression is that the safe ...
0
votes
0answers
47 views

How to create an Enterprise custom field programmatically for Project Server

I want a Sharepoint 2013 app to create programmatically an Enterprise Custom Field when it runs for the first time. I fiddled around with the following code snippet, but it's not working var ...
2
votes
2answers
170 views

Dynamically get default display form url in sharepoint 2013 by REST or JSOM

How can I get default display form url of sharepoint list item via Rest or JSOM. I found the result by link: How to get the Display Form URL, using REST But the XML returns all of the display form ...
0
votes
0answers
19 views

Remote access development

I'm relatively new and have tried to search posts regarding this problem but I'm not sure whether I'm hitting the right sites. The scenario is this. I have a sharepoint 2013 installed on ...
0
votes
1answer
57 views

query calender list so user cant book same date and time

Update var context= SP.ClientContext.get_current(); var web = context.get_web(); var list = web.get_lists(); var targetList; function createItem() { targetList = ...
0
votes
1answer
46 views

Get person profile properties by name

Is there a quick solution of getting someone's user profile given just their name? I want to get the mysites url of the user and I only have their name.
0
votes
1answer
61 views

Error Unable to get property 'getEnumerator' of undefined or null reference

Getting the following error when running my script: Unable to get property 'getEnumerator' of undefined or null reference My code : NBSFeedbackEditInbox.FeedbackRemove = (function () { var ...
0
votes
2answers
33 views

client context not initialized error

I have a client context not initialized error and I have no clue how to fix it I feel like I have tried everything. Would appreciate some help Here is my code : Code that gets the list: var SFW = ...
0
votes
1answer
54 views

CSOM and JSOM when to use

Hi Just a quick question on when to use CSOM and JSOM. I've created a page using SPD and want to retrieve list items. I assume I should use JSOM for this however can I use CSOM code also? If I ...
0
votes
1answer
56 views

new SP.ClientContext(siteUrl); — Object does not support this action

var siteUrl='sites/mysite'; function wait(){ var clientContext = new SP.ClientContext(siteUrl); ....more code.... } SP.SOD.executeFunc('sp.js', 'SP.ClientContext', wait()); ERROR: ...
0
votes
1answer
42 views

CAML Query works in U2U CAML Query Builder, but not SharePoint

I built a CAML query using U2U CAML Query Builder and it works when I execute it in the builder, but when I go to JSOM in SharePoint, I get the entire list and none of the filters from the query work. ...
0
votes
1answer
40 views

Sharepoint Online Public Website Forms

I have several forms that need to be sent to an email when filled. How do i do this to enable anonymous users to do that, It only allows authenticated users to submit the form via JSOM
0
votes
0answers
34 views

Import search configuration in JSOM

Does somebody know if it's possible to import a search configuration XML file to a SharePoint 2013 site collection in JSOM? I am trying to do so, but didn't find anything relevant: everything I find ...
0
votes
2answers
75 views

JSOM default groups when creating subsite

function createWebsite(siteName, site) { this.clientContext = typeof site !== 'undefined' ? new SP.ClientContext(site) : SP.ClientContext.get_current(); this.oWebsite = ...
1
vote
1answer
51 views

init.js Obect expected error with SP.SOD.executeOrDelayUntilScriptLoaded

I am using SP.SOD.executeOrDelayUntilScriptLoaded as follows SP.SOD.executeOrDelayUntilScriptLoaded(NBSFeedbackEditInbox.FeedbackRemove.removemessage(itemid), "sp.js"); Yet I am getting an error ...
1
vote
1answer
32 views

Request failed. Column 'Project Phase' does not exist. It may have been deleted by another user

function fetchProjectData(projectName, callbackOnSuccess) { var clientContext = new SP.ClientContext("path to site"); var oList = clientContext.get_web().get_lists().getByTitle('Project ...
1
vote
3answers
62 views

Error from javascript file but not console?

The error in question Uncaught Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. ...
0
votes
2answers
36 views

Stop workflow associated to a list via JSOM

I want to stop a workflow when user clicks on the Cancel request button. To achieve this I am trying with the JSOM code. My code as follows SP.SOD.executeOrDelayUntilScriptLoaded(function(){ ...
2
votes
2answers
119 views

Get url of ALL lists on a SharePoint 2013 site using JSOM

I'm trying to retrieve the url for all lists on the current SharePoint site. I've managed to get the title for each list, I've also found resources explaining how to get the url of one specific list. ...
0
votes
0answers
35 views

Upload aspx file to host web in App Installed remote event receiver (rest file upload)

I'm creating AppInstalled remote event receiver that should upload aspx file to host web library (library is also created in app installed receiver). If I set app permissions to Web:Manage I can't ...
1
vote
1answer
66 views

How to get all events from multiple sites

I am currently getting all events from a calendar one calendar at a time. These are all sharepoint online calendars. This is working fine but a little slow. The basic of what I am doing is: ...
0
votes
0answers
52 views

Update Custom Field in Task Level Project Server using JSOM (PS.js)

Does anyone have javascript which updates the task level custom field? I just have the code with C#. I am trying to convert this code (below) to javascript and use it. DraftProject projCheckedOut = ...
0
votes
0answers
35 views

SharePoint-Hosted App check if folder exist in HostWeb

This is wierd, i have created a folder in site asset programmatically by JSOM. Then i created a function to see if my folder exist or not (In the GUI its visible). My function returns null but if i ...
1
vote
2answers
99 views

Get list default view url in SharePoint JSOM Client Object Model

I have simple JSOM script to get all the list and it's default view url but i am not getting default view url property var context; var lists; // This code runs when the DOM is ready and creates a ...
0
votes
2answers
40 views

How are Deferreds different from callbacks

I have following piece of SharePoint JavaScript client object code which works perfectly without throwing any error. $(document).ready(function () { //don't exectute any jsom until sp.js ...
0
votes
0answers
30 views

Using SP.UserProfiles.PersonalSiteInstantiationState

I am attempting to check a User's MySite status by utilizing sp.js to return the following enumerations. I have had success using the People Manager & Person Properties objects, but not the User ...
0
votes
1answer
34 views

2013 MySite - WebPart provides user properties

I'm currently branding a 2013 MySite host and to do so I access some user information via JSOM. EnsureUserProperties: function (callback) { /// <summary> /// Ensures that the ...
1
vote
0answers
23 views

Cannot update allowMembersEditMembership

I can't seem to update the setting on a group to allow members to edit members. This is my code: function setGroupsMembershipEditingMode(uri) { var context = new SP.ClientContext(appweburl); var ...
1
vote
1answer
159 views

Assigning Folder Permissions with JSOM

Is it possible to use JSOM to assign unique folder permissions? I found the SP.BasePermissions.set() method but can't seem to find much documentation on it. Much more out there using C# but ...
-2
votes
1answer
80 views

SharePoint WCF SOAP, Rest, AJAX [closed]

I need to know the following things: How is SharePoint used with WCF, REST and SOAP.
1
vote
1answer
48 views

Difference between ViewFields and Include, in JSOM

I am working on a solution where I am using JSOM, I got confused on to the usage of Include in when you load the items collection, and usage of to get which fields you want? What's the specific ...
0
votes
1answer
76 views

Get user Login from User or Group field

I have a list with User og Group field. I've retrieved item from it, now I need to get user's Login. By reading User or Group field I can get only user id and account name. here's my code: var ...
0
votes
2answers
105 views

Modify list view with JSOM

How can I make fields invisible on my list view, all items? It is something wrong with my code now: it changes the view but the only field it is displaying is Title and Modified. I want to display ...