How to get fields of enterprise Task/Project/Resource of SharePoint in JSOM or JavaScript?
Get field of enterprise Task/Project/Resource of SharePoint in JSOM or JavaScript: Use the below snippet all fields/column of Task using JSOM. <script type="text/javascript" src="_layouts/15/sp.js"></script> <script type="text/javascript" src="_layouts/15/ps.js"> </script> <script type="text/javascript" > var Fields = []; function getFields (from, type) { // console.log(type); console.log('Getting all fields'); // Initialize the current client context. var filcontext = PS.ProjectContext.get_current(); var allFields = filcontext.get_customFields(); filcontext.load(allFields, "Include(Id, Name, EntityType, InternalName, FieldType, Formula)"); filcontext.executeQueryAsync(OnRequestSuccess, OnRequestFailed); // Callback for request failure function OnRequestFailed (sender, args) { console.log(args.get_...