Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Validation on sales line sales price is not less then average cost price in x++

Posted on by 205

Hi Experts,

I need to give the validation on the sales line when users enter the sales price less than the average cost price. The message shows them " the sales price is less then Item price."

Thanks in advance.

  • Kariem El Sayed Profile Picture
    Kariem El Sayed 10 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hey Mr. DeepPanknonu

    How did you solve it as i have similar requirement.

  • DEEPAKNONU Profile Picture
    DEEPAKNONU 205 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hey Mr. Will, thanks for your valuable solution but I'm using 2012 R3 version of AX and also I solved my issue thanks.

  • DEEPAKNONU Profile Picture
    DEEPAKNONU 205 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hey Mr. Spike, thanks for your valuable suggestion I solved my issue with put the validation on validate write method on sales line table.

  • WillWU Profile Picture
    WillWU 22,350 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hi DEEPAKNONU,

    You could try to use form datasource field event "onValidating" to validate the salesprice.

    Go to SalesTable(form)->DS->SalesLine->salePrice->events.

    pastedimage1591335530242v1.png

  • Gao Lu Wang Profile Picture
    Gao Lu Wang 180 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hi Deepaknonu,

    can you add the validation code in the table salesline's  validateFieldValue method?

  • DEEPAKNONU Profile Picture
    DEEPAKNONU 205 on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hey Dr.Ludwig, I really appreciate your response and your suggestion . I already use this standard feature but my client need that, If the user gave the less cost then the item average cost price in sales price. Then user cannot proceed for further steps. That's why I need to put validation in X++ as I mention in my question.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Validation on sales line sales price is not less then average cost price in x++

    Hi,

    Would this standard feature do the job?

    organicax.com/.../

    Best regards,

    Ludwig

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans