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
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 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
Today we spun up a new Dynamics 365 sales trail instance and navigated to my environment. I have created an Order and saved then trying to add Products to this Order but getting the below error:
Detailed Error Info:
Exception Message: Required field SalesOrder Id is missing
ErrorCode: -2147220989HexErrorCode: 0x80040203
ErrorDetails: HttpStatusCode: 400
TraceText: [Microsoft.Dynamics.Sales.Plugins: Microsoft.Dynamics.Sales.Plugins.PreOperationSalesOrderLineCreate] [ef56ab95-e28e-e611-80f1-00155dc13602: Microsoft.Dynamics.Sales.Plugins.PreOperationSalesOrderLineCreate: Create of salesorderdetail] Entered Microsoft.Dynamics.Sales.Plugins.PreOperationSalesOrderLineCreate.Execute(), Correlation Id: e67b024b-cc26-4853-8f77-ccff94ed168b, Initiating User: c5b3022a-440c-ec11-b6e5-000d3a339c1d Exception: Microsoft.Dynamics.Solution.Common.CrmArgumentNullException: Required field SalesOrder Id is missing (Fault Detail is equal to Exception details: ErrorCode: 0x80040203 Message: Required field SalesOrder Id is missing StackTrace: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at Microsoft.Dynamics.Solution.Common.CrmException.BuildOrganizationServiceFault(Exception innerException, Int32 errorCode, Int32 statusCode, String message) at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException, Boolean enableTrace) at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException) at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode) at Microsoft.Dynamics.Solution.Common.CrmArgumentNullException..ctor(String message) at Microsoft.Dynamics.Solution.Common.Exceptions.ThrowIfNull...)., Correlation Id: e67b024b-cc26-4853-8f77-ccff94ed168b, Initiating User: c5b3022a-440c-ec11-b6e5-000d3a339c1d Exiting Microsoft.Dynamics.Sales.Plugins.PreOperationSalesOrderLineCreate.Execute(), Correlation Id: e67b024b-cc26-4853-8f77-ccff94ed168b, Initiating User: c5b3022a-440c-ec11-b6e5-000d3a339c1d
Activity Id: 875ea5f9-184f-491c-a024-b6c27b9f54d4
Trail instance Details:
Anyone can help on this issue, thanks in advance.
Hi Vijay Jupudi,
i can see you are trying to add Order Details without Order. try creating order then try creating order line.
if it not helps try enabling order in the Order Detail form then make sure Order field is not empty so that the record will save
Please mark as Answer if it is helpful and provide Kudos
Blog : microsoftcrmtechie.blogspot.com
Subscribe : www.youtube.com/.../UCnGNN3hdlKBOr6PXotskNLA
Have you added the product from the sub-grid of the order?
From the error, "Exception Message: Required field SalesOrder Id is missing", which indicates that order lookup field is null, so you need check the field.
By default, Order lookup field is not show in the order line form.
Go settings > Customizations > Customize the system > Entities > Order Line > Forms to open 'Information'.
Double-click the order field to open dialog, check 'Visible by default' option.
Save and Publish all customizations.
After clicking 'Add product' button in order entity, order lookup field should be filled automatically.
I created an Order and saved this one then click on Add Products button in the order and try to add a product into that order but getting an error.
PFA video for reference.
Thanks in advance.
You need ensure that price list filed value from two entities(Order and Product) is same.
For example, i am trying to add Product--P1 to Order1:
Then i can add product to order successfully.
I did changes in my trial instance as per your suggestions. Created order with basic details and saved the order then I clicked on Add product button. It navigated to the Order Line page. The Order is not populated automatically on Order Line Page (it was surprising to me). I have selected the order manually and then I was able to add the product to the Order. Is this Expected behavior?
I have a small doubt, a few weeks back ago we spun up a new trial instance we can able to add the product without these changes in that trial instance and also noticed one more change (line item product) in previous and new sale trail instance is :
In Old Sales Trail instance: Have an Order Product entity
In New Sales Trail instance: Have an Order Line entity
Layout also changed:
I am not sure why this was changed in the new trial version? Please suggest to me If I missed anything.
The Order is populated automatically on Order Line Page if you create it from order page, which is expected behavior.
Order Line and Order Product are same entity(salesorderdetail), just the display name was changed in the version upgrade.
Thanks for your quick response, I really appreciate you. Yes, you are correct the name changed from "Order Product" to "Order Line" in the new version but the Order name/number is not populated automatically on the Order Line page when we clicked on Add Product button from Order in my trail instance. I think, Order number/name should be populated automatically when we navigated from Order page. Please correct me if I am wrong.
PFA video for your reference.
Yes, Order number/name should be populated automatically when we navigated from Order page.
I have reproduced your situation in the same version, Order field need to be populated manually.
but i switched to another form of order line--Project information accidentally.
Then Something magical happened.
When i go back to Order to create product again, now order filed is populated automatically.
As I tried to replicate the populate the Order automatically in Order Line page as per your suggestions, but there is no luck for me in my instance.
PFA video for your reference.
Please let me know am I missed any steps?
1.When you switch to 'Project Information' form, then click Order in sitemap to back directly.
(Don't switch information form again, which is to ensure that the default form when opened next time is 'Project Information' form)
2.Add product from order again, default form is 'Project Information' and order is filled automatically, then you can switch to information form.
This step is required once, the order can be populated automatically next time though default form that open is information.
3.Now, when you add product and information is default form.
In fact, i found one interesting thing:
when you try to switch 'Field Service Information' form, It will display briefly for a few seconds, then quickly switch back Information, and clear Order lookup value.
In the video you provided, I saw this process, which is why your lookup field is null, and it can be avoided by the step 1 I provided.
Or you can remove other forms of order line from current app.
Go app designer, find order line app and click form to only select information form.
Now, Without any other action, it will be directed to information form and order lookup filed can be populated automatically.
Has the problem been solved? Any updates?
Please click Yes under "Did this answer your question?" to close this thread.
Business Applications communities