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

Announcements

No record found.

News and Announcements icon
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

  • 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans