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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cannot create Sales Li...
Power Automate
Answered

Cannot create Sales Line from CRM to NAV using MS Flow

(0) ShareShare
ReportReport
Posted on by 13

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

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    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

  • Verified answer
    NavBoy Profile Picture
    13 on at

    Hi,

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

     

    Thanks for your suggestion!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard