cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
NavBoy
Level: Powered On

Cannot create Sales Line from CRM to NAV using MS Flow

Hi,

I'm receiving the following error for the "NAV Create Item" action in the Sales Line flow.

Dynamics NAV: Request failed: The remote server returned an error: (400) Bad Request. (Document No. must have a value in Sales Line: Document Type=Order, Document No.=, Line No.=0. It cannot be zero or empty.)

 

The Sales Header gets created in NAV and the Order No. is maintained in CRM. Now while passing the Sales Line, I'm sending this Order No. but in another field as the out-of-box Document No. doesn't show up in MS Flow field mapping. I even wrote a code in NAV on the first line OnInsert trigger to assign the values to these primary key fields but still Flow throws the same error.

 

Appreciate if you could provide any alternative solution to this problem.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
NavBoy
Level: Powered On

Re: Cannot create Sales Line from CRM to NAV using MS Flow

Hi,

I used a different approach and I was able to fetch the value in NAV.

 

Thanks for your suggestion!

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Cannot create Sales Line from CRM to NAV using MS Flow

Hi @NavBoy,

 

From the error message, it seems that you haven’t provided values for Sales Line, Document Type, Document No.

I assume that you are using Dynamics 365 trigger When a record is created, what dynamic contents have you selected from the trigger for the NAV action Create item’s fields?

Could you check the return value of each dynamic content?

Besides, please make sure you are providing a valid value for each field. To know what exact value each field needs, please use the action Get item to get all the value from of a record.

After getting to know what exact value is needed for each field, please try again with valid value for corresponding fields.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
NavBoy
Level: Powered On

Re: Cannot create Sales Line from CRM to NAV using MS Flow

Hi,

I used a different approach and I was able to fetch the value in NAV.

 

Thanks for your suggestion!

View solution in original post

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,185)