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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Unable to add Products into Order in Sales Trail instance

(0) ShareShare
ReportReport
Posted on by 44

Hi Guys,

     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:

    Error popup:

    pastedimage1630933102868v3.png

Detailed Error Info:

Exception Message: Required field SalesOrder Id is missing

ErrorCode: -2147220989
HexErrorCode: 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:

pastedimage1630932945589v2.png

Anyone can help on this issue, thanks in advance.

I have the same question (0)
  • Ram Prakash Profile Picture
    2,287 on at
    RE: Unable to add Products into Order in Sales Trail instance

    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

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Vijay,

    Have you added the product from the sub-grid of the order?

    pastedimage1630992412265v1.png

    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'.

    pastedimage1630992788275v3.png

    Double-click the order field to open dialog, check 'Visible by default' option.

    pastedimage1630992731738v2.png

    Save and Publish all customizations.

    Test:

    After clicking 'Add product' button in order entity, order lookup field should be filled automatically.

    pastedimage1630994467538v4.png

  • Vijay Jupudi Profile Picture
    44 on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Ramprakash,

          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.

          [View:/cfs-file/__key/communityserver-discussions-components-files/762/2021_2D00_09_2D00_07_5F00_12h16_5F00_25.mp4:320:240] 

    Thanks in advance.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Vijay,

    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:

    pastedimage1630999751858v1.png

    Price List:

    pastedimage1630998985394v1.png

    Then i can add product to order successfully.

    pastedimage1630999215077v2.png

  • Vijay Jupudi Profile Picture
    44 on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Leah,

         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

    pastedimage1631005166810v1.png

        Layout also changed:

    pastedimage1631005432724v2.png

       I am not sure why this was changed in the new trial version?  Please suggest to me If I missed anything. 

  • Community Member Profile Picture
    on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Vijay,

    The Order is populated automatically on Order Line Page if you create it from order page, which is expected behavior.

    pastedimage1631007309565v1.png

    Order Line and Order Product are same entity(salesorderdetail), just the display name was changed in the version upgrade.

    pastedimage1631007451611v2.png

  • Vijay Jupudi Profile Picture
    44 on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Leah,

       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.  

    [View:/cfs-file/__key/communityserver-discussions-components-files/762/2021_2D00_09_2D00_07_5F00_18h56_5F00_36.mp4:320:240]

    Thanks in advance.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Vijay,

    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.

    pastedimage1631065229840v2.png

    but i switched to another form of order line--Project information accidentally.

    pastedimage1631070112300v9.png

    Then Something magical happened.

    When i go back to Order to create product again, now order filed is populated automatically.

    pastedimage1631070031525v8.png

  • Vijay Jupudi Profile Picture
    44 on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Leah,

       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.

    [View:/cfs-file/__key/communityserver-discussions-components-files/762/2021_2D00_09_2D00_09_5F00_09h16_5F00_39.mp4:320:240]

       Please let me know am I missed any steps?

    Thanks in advance.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Unable to add Products into Order in Sales Trail instance

    Hi Vijay,

    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)

    pastedimage1631170246357v2.png

    2.Add product from order again, default form is 'Project Information' and order is filled automatically, then you can switch to information form.

    pastedimage1631170541208v3.png

    pastedimage1631170825951v5.png

    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.

    pastedimage1631170737664v4.png

    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.

    pastedimage1631171003307v6.png

    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.

    pastedimage1631171618233v8.png 

    pastedimage1631171582752v7.png

    Now, Without any other action, it will be directed to information form and order lookup filed can be populated automatically.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 149

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 132

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 123 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans