Quantcast
Viewing all articles
Browse latest Browse all 5347

How to create an Enterprise custom field programmatically for Project Server

Hello!

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 projContext = PS.ProjectContext.get_current(); 
function AddCustomField() {        $('#message').text('Adding Custom Field...');        var object_to_add = new PS.CustomFieldCreationInformation();        object_to_add.set_name("New_one");      
        object_to_add.set_description("test description");         projContext.CustomFieldCollection.add(object_to_add);
}



Any help would be appreciated!



Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>