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

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,917 Super User 2025 Season 2 on at

    Hi Medhi,

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

  • Community Member Profile Picture
    on at

    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"

  • André Arnaud de Calavon Profile Picture
    300,917 Super User 2025 Season 2 on at

    Hi Mehdi,

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

  • Verified answer
    Community Member Profile Picture
    on at

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

  • Tanmay Profile Picture
    45 on at

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

  • Tanmay Profile Picture
    45 on at

    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

    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

  • Suggested answer
    vidyadhar reddy Profile Picture
    on at
  • Suggested answer
    Trilok Mohnani Profile Picture
    107 on at

    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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans