Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Adding Stop dialog box on Sales agreement

Posted on by 485

Hello Experts,

Can anyone be so kind in helping me find where I can drop some code or modify some methods to ensure all values entered in the unit price for a sales agreement7220.IMG1.PNG is more than or equal to the average unit price of an item? I have to do this for the sales agreement because users enter the unit price manually. Now I only need some help in figuring out how to get to validate the control. When I look up the unit price for the item.... I am seeing  (ALine_AgreementLineQuantityCommitment).PricePerUnit but there is no table called ALine_AgreementLineQuantityCommitment...

Please guys, any help would be greatly appreciated.

*This post is locked for comments

  • Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Adding Stop dialog box on Sales agreement

    Is this community.dynamics.com/.../301706 the same question ?

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Adding Stop dialog box on Sales agreement

    Hi,

    You haven't got the actual buffer on the variable agreementLineQuantityCommitment.

    For instance,

    Select agreementLineQuantityCommitment where agreementLineQuantityCommitment.Agreement = salesagreementheader.recId;

    /Uday.

  • Lionel07 Profile Picture
    Lionel07 485 on at
    RE: Adding Stop dialog box on Sales agreement

    this is the method am using but its not working:

    public boolean validate()

    {

       AgreementLineQuantityCommitment agreementLineQuantityCommitment;

      boolean ret;

       ret = super();

       if(agreementLineQuantityCommitment.PricePerUnit<100)

           ret= checkFailed('Any message that you may want to display.');

       return ret;

    }

  • Lionel07 Profile Picture
    Lionel07 485 on at
    RE: Adding Stop dialog box on Sales agreement

    How do I use the field for example PricePerUnit? i need to validate the value input in this field.  I am trying to implement the override method. How do I access the field and use it as an instance of the table. for example CustTable _custtable

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Adding Stop dialog box on Sales agreement

    Hi,

    AgreementLineQuantityCommitment is the table name. this has been derived from table AgreementLine (Table inheritance concept). thats why it is shown as Aline_AgreementLineQuantityCommitment.

    /Uday.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans