In the following REST API, I can add a project to the PWA site. The only problem I am having is that I can't seem to figure out how to add to a custom field. For my example, I want to add to the "Project Departments" column but I am not sure how to add it in my parameters. How can I add text to the "Project Departments" column?
Method: POST
Uri: _vti_bin/client.svc/ProcessQuery
Headers:
accept: application/json;odata=verbose
Content-Type: text/xml
Body:
<Actions>
<Method Name="SetCustomFieldValue" Id="14" ObjectPathId="8">
<Parameters>
<Parameter Type="String">Custom_x005f_9d77d62aa92e4d40adc6146c90eb5156</Parameter>
<Parameter Type="Array">
<Object Type="String">Entry_26fc22b482eee811afb200155d766822</Object>
</Parameter>
</Parameters>
</Method>
<Method Name="Update" Id="15" ObjectPathId="6" />
</Actions>
<ObjectPaths>
<Property Id="6" ParentId="0" Name="EnterpriseResources" />
<Method Id="8" ParentId="6" Name="GetById">
<Parameters>
<Parameter Type="String">48dd454c98-66d2-ea11-917e-fc3fdbfe3fed</Parameter>
</Parameters>
</Method>
<Constructor Id="0" TypeId="{3a609e855f-e2a1-497c-87a2-e5e8a781d096}" />
</ObjectPaths>
</Request>
I am confused which Id's need to go where...
For
<Method Id="8" ParentId="6" Name="GetById">
<Parameters>
<Parameter Type="String">48dd454c98-66d2-ea11-917e-fc3fdbfe3fed</Parameter>
</Parameters>
</Method>
What Id goes here? The project ID?
And what about constructor?
<Constructor Id="0" TypeId="{3a609e855f-e2a1-497c-87a2-e5e8a781d096}" />
What Id goes here?
The Error:
"The property 'Departments' does not exist on type 'PS.ProjectCreationInformation'. Make sure to only use property names that are defined by the type."