Contents
How to get value of custom field task in CSOM Project Server?
I am working on a console application for project server. Atm I can read the name and work percent of each task assined to the project. Each task has a custom field with an unique id. It looks like this.
Office Developer Tools for Visual Studio 2012 automatically adds references to some assemblies commonly used in SharePoint Add-ins and sets the Copy Local property. These examples show how to use the .NET Framework CSOM to complete website-related tasks. Retrieve the title of a SharePoint website.
How to get value of a custom field task?
You are only getting values from the first row because LCFColl is defined as the custom fields of the object variable theTask not the variable t that you use inside your loop. Move the declaration of LCFColl inside your task loop:
What are the custom fields in project online?
Project Online (as a part of Office 365) and Project Server 2013/2016 (on-premise) contains core objects such as project, resource, task. To meet business needs we need to extend available object attributes. To achieve this goal in Project Online (Server) there are Enterprise Custom Fields (ECF).
How to read project level custom field value?
Here I’m gonna show you how to read the Project level Enterprise custom field value using CSOM. The below code is for to read the text type custom field value but not the look up type. Will describe reading the look up type custom fields in another post separately.
How to load custom fields from the server?
Complete solution is just about fivty rows of code: To read or modify the field we have to know its internal name. Usually, it equals “Custom_” + field GUID. To load it from the server just reference it in the lambda expression in the Load method. To send changes to the server use the Update method of EnterpriseResources collection.