Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How To change "Default Quantity For Line" default value

(0) ShareShare
ReportReport
Posted on by

Hi All,

I would like to change the value of Default Quantity For Line from "product recipt quantity" to "Ordered quantity"

4861.Sans-titre.png

this is a drop dialog that point to this form VendEditInvoiceDefaultQuantityForLinesDropDialog and i created a handler that initialize le value of the lookup to desired value :

class ITFVendEditInvoiceDefaultQuantityForLinesDropDialog_Handler
{
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    [FormEventHandler(formStr(VendEditInvoiceDefaultQuantityForLinesDropDialog), FormEventType::Initialized)]
    public static void VendEditInvoiceDefaultQuantityForLinesDropDialog_OnInitialized(xFormRun sender, FormEventArgs e)
    {
        FormComboBoxControl specQty = sender.control(sender.controlId(formControlStr(VendEditInvoiceDefaultQuantityForLinesDropDialog, SpecQty))) as FormComboBoxControl;
        specQty.selection(PurchUpdate::All);
    }

}

but nothing changed how can i change it thanks :D

*This post is locked for comments

  • Suggested answer
    Trilok Mohnani Profile Picture
    105 on at
    RE: How To change "Default Quantity For Line" default value

    you need to save this in personalization and then when you invoice PO next time it will prompt you to change it from order quantity to default.

    Select no and you will have default set to "Order quantity" next time you invoice the PO.

    Hope this helps.

  • Suggested answer
    vidyadhar reddy Profile Picture
    on at
  • Tanmay Profile Picture
    45 on at
    RE: How To change "Default Quantity For Line" default value

    I figured out the way to do this. Complete one Invoice Posting "with Order Qty". Next time you will get pop up with recommended to "Product receiptQty" and answer with "NO".  Hope this works

  • Tanmay Profile Picture
    45 on at
    RE: How To change "Default Quantity For Line" default value

    I figured out the way to do this. Complete one Invoice Posting "with Order Qty". Next time you will get pop up with recommended to "Product receiptQty" and answer with "NO".

  • Tanmay Profile Picture
    45 on at
    RE: How To change "Default Quantity For Line" default value

    Hi Mehdi, is there anyway we can change default from Front end? Please share the steps if any

  • Verified answer
    Community Member Profile Picture
    on at
    RE: How To change "Default Quantity For Line" default value

    I get the solution : create a post event in init method of the form above

  • André Arnaud de Calavon Profile Picture
    293,302 Super User 2025 Season 1 on at
    RE: How To change "Default Quantity For Line" default value

    Hi Mehdi,

    How did you change the records in the PurchParmUpdate table? I assume not with the code mentioned above.

  • Community Member Profile Picture
    on at
    RE: How To change "Default Quantity For Line" default value

    Hi André,

    I have 3 ligne in the table purchParamUpdate and i updated them to "Ordred quantity" but the lookup in th form show "product recipt quantity"  not "Ordred Quantity"

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    293,302 Super User 2025 Season 1 on at
    RE: How To change "Default Quantity For Line" default value

    Hi Medhi,

    The value is a database table value. You have to set a data event instead of a form event on a control.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,302 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,108 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans