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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

How to pass item Line UDF value during makeing the Quote to SO or SO to Posted invoice.

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I have create a item line UDF both in Quote Page and Sales Order. But I don't know how to pass these value from quote to sales order like other field during make the quote to sales order. The CodeUnit seems to copy the field and delete orign line record. I could not able to find the field in Sales Line to link two record.

Thanks in advance.

WeChat-Screenshot_5F00_20181103114818.pngWeChat-Screenshot_5F00_20181103114838.pngWeChat-Screenshot_5F00_20181103114849.png

Categories:
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Ruining,

    Well, The info about your Quote is stored in the Sales Header (Field "Quote No."). Try this code (I didn't test it)

    tableextension 50010 SalesLineExt extends "Sales Line"
    {
    ................
        trigger OnBeforeInsert()
    var
    SalesHeader : Record "Sales Header"; begin
    if SalesHeader.GET("Document Type"::Quote,Rec."Quote No.") then Begin Rec.UDF1 := SalesHeader.UDF1; Rec.UDF2 := SalesHeader.UDF2; ...................... ...................... End; end; .................. }


    If it doesn't work with OnBeforeInsert, try the same code on the OnInsert Trigger. If it doesn't work (you can try to create another table associated to your Sales Lines in which you copy your UDFs and the Sales Quotes Line No when you create a Sales Quote, then in OnInsert check your new table with Quote No and copy your UDFs)

    --

    Don't hesitate if If you need more details or explanations.

    -------------

    Please verify my answer if you find my answer helpful. Doing so you'll show other community members that there was found a solution and you credit my help.

    -------------

    Best Regards,

  • Community Member Profile Picture
    on at

    Thank you for your reply. Actually I found it will automatically bring the line level to sales order or posted invoice. You need to insert the header level info. by yourself. Thank you so much.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans