web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Want to create resource requirement using CRM SDK method

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to create a resource requirement using CRM SDK Method, I tried the below syntax and it throwing error as "Value cannot be null.Parameter name: value"

msdyn_resourcerequirement resourcerequirement = new msdyn_resourcerequirement();
resourcerequirement.msdyn_name = "Test 1";
resourcerequirement.msdyn_allocationmethod = new OptionSetValue(192350000);
resourcerequirement.msdyn_duration = 180;
resourcerequirement.msdyn_IsPrimary = true;
resourcerequirement.msdyn_WorkLocation = new OptionSetValue(690970000);
resourcerequirement.msdyn_Status = new EntityReference("msdyn_requirementstatuses", new Guid("some GUID"));
resourcerequirement.OwnerId = new EntityReference("systemuser", new Guid("some GUID"));
Guid resourcerequirement Id = organizationProxy.Create(resourcerequirement);

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hello there,

    please try to debug the code to see in which line this code is failing.

    also a suggestion - make sure you are getting the crm service properly and its not null. see here : community.dynamics.com/.../155508  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans