Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

How to create EnterpriseResource with CustomField

$
0
0

Hi,

I would like to create an EnterpriseResource with CustomField using CSOM in Project Server 2013. I can create EnterpriseResource  by following code

                                        

 EnterpriseResourceCreationInformation newRes = new EnterpriseResourceCreationInformation();
                    newRes.ResourceType = EnterpriseResourceType.Work;
                    newRes.Name = item.FullName;
                    newRes.Id = Guid.NewGuid();
                    newRes.IsBudget = false;
                    newRes.IsGeneric = false;
                    newRes.IsInactive = false;

                   EnterpriseResource res = resources.Add(newRes);
                   resources.Update();

                   projContext.ExecuteQuery();

But this EnterPriseResource does not contains list of CustomFields(list of customFields is empty). 

projContext.Load(res.CustomFields);

projContext.ExecuteQuery();

I tried to add some dictionary item in res.FieldValues, but I had no success.

Thanks, Serg Samoilov


Viewing all articles
Browse latest Browse all 5347

Trending Articles



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