Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Cannot qualify Lead to Opportunity on a Sandbox D365 online instance

Posted on by 2

When trying to qualify a Lead to an Opportunity on our sandbox instance, I get the below error. We do not have any issue with the same process on our production instance.

"Attribute 'msdyn_contractorganizationalunitid' cannot be NULL If you contact support, please provide the technical details."

The log file details are below:

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xmlns:xml="www.w3.org/.../namespace" xml:lang="en-US">Attribute 'msdyn_contractorganizationalunitid' cannot be NULL</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts"><ActivityId>8c3664f3-b729-4a79-8ce7-8df280f850d2</ActivityId><ErrorCode>-2147220891</ErrorCode><ErrorDetails><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">OperationStatus</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">0</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">SubErrorCode</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">-2146233088</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>Attribute 'msdyn_contractorganizationalunitid' cannot be NULL</Message><Timestamp>2017-09-21T00:56:41.4393044Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><InnerFault><ActivityId>8c3664f3-b729-4a79-8ce7-8df280f850d2</ActivityId><ErrorCode>-2147220891</ErrorCode><ErrorDetails><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">OperationStatus</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">0</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">SubErrorCode</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">-2146233088</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>Attribute 'msdyn_contractorganizationalunitid' cannot be NULL</Message><Timestamp>2017-09-21T00:56:41.4393044Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><InnerFault><ActivityId>8c3664f3-b729-4a79-8ce7-8df280f850d2</ActivityId><ErrorCode>-2147220891</ErrorCode><ErrorDetails><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">OperationStatus</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">0</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">SubErrorCode</a:key><a:value xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" xmlns:i="www.w3.org/.../XMLSchema-instance" i:type="b:int">-2146233088</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>Attribute 'msdyn_contractorganizationalunitid' cannot be NULL</Message><Timestamp>2017-09-21T00:56:41.4393044Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><InnerFault xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><OriginalException xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><TraceText xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /></InnerFault><OriginalException xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><TraceText xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /></InnerFault><OriginalException xmlns:i="www.w3.org/.../XMLSchema-instance" i:nil="true" /><TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[7ccdbd4d-4796-e711-8102-c4346badf5b8: ]
Starting sync workflow 'Contracting Unit is Required', Id: 75cdbd4d-4796-e711-8102-c4346badf5b8
Entering ConditionStep1_step:
Entering SetFieldRequiredLevelStep4_step:
Sync workflow 'Contracting Unit is Required' terminated with error 'Attribute 'msdyn_contractorganizationalunitid' cannot be NULL'
</TraceText></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

Any help would be appreciated.

Thanks in advance,

Dominic.

*This post is locked for comments

  • Ben John Profile Picture
    Ben John 559 on at
    RE: Cannot qualify Lead to Opportunity on a Sandbox D365 online instance

    I changed the scope of the business rule from "Entity" to "All Forms".

    By that way the lead qualification process will not be interrupted and the field is still required wenn the opportunity forms opens after the qualification is completed.

  • Verified answer
    RE: Cannot qualify Lead to Opportunity on a Sandbox D365 online instance

    The 'Contracting Unit is Required' condition is a Business Rule in the Opportunity entity. When deactivated, the Lead now can be qualified. This condition gets set when the Opportunity Type is 'Work based'.

    Based on requirement, this rule can be enabled or disabled.

    3073.Entity.png

    Regards,

    Dominic.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans