Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have created a custom entity in dynamics 365 and having the opportunity lookup within this custom entity. I Tried to create record within that child entity was able to create record.
Alter that I have updated the Status Reason field in opportunity with 2 new options and then tried to create new record within that custom entity now I am getting below error:
Exception Message: 2 is not a valid status code for state code ig1_opportunitycloseplanState.Active on ig1_opportunitycloseplan with Id b069b974-a752-ec11-8c62-000d3a8fcf35.
ErrorCode: -2147187704HexErrorCode: 0x80048408
ErrorDetails: ApiExceptionSourceKey: Plugin/Microsoft.Crm.ObjectModel.CustomBusinessEntityService ApiStepKey: c38f4b8e-4e4c-ec11-8c62-000d3a8fcf35 ApiDepthKey: 1 ApiActivityIdKey: 1489b1b2-2a89-4678-ae8e-ae8db9b78eb8 ApiPluginSolutionNameKey: System ApiStepSolutionNameKey: System ApiExceptionCategory: ClientError ApiExceptionMessageName: InvalidStateCodeStatusCode ApiExceptionHttpStatusCode: 400
Activity Id: fd55a34e-2625-43d6-914d-2739bdb107d5
I also added same 2 items within the Status Reason field in child's entity but getting same error.
Kindly suggest on the same. Thanks in advance.
As you mentioned, “updated the Status Reason field in opportunity with 2 new options”, the error occurred after adding two new status reason options to the opportunity entity?
You need ensure status reason and status is corresponding.
——— is not a valid status code for state code entity - Microsoft Dynamics CRM Community
Also,It is important to ensure that the custom status reasons added for Opportunity are also present in a special attribute of Opportunity Close entity with schema name "OpportunityStatusCode".
If the problem is still not solved, can you provide a screenshot of the settings(status reason new options, problematic opportunity record...) so I can reproduce your problem?
Have you solved your problem? or any updates?
Can you click Yes under "Did this answer your question?" to close this thread if my answer is helpful.
Thanks in advance!:)
Business Applications communities