Add validation code in OnValidate code of existing field by extension

Hi Experts,

I was using AL for creating new table/page by extension.
I came across a requirement where I want to add an additional validation code in OnValidate trigger of a field in Item table by extension.
Can you please suggest as I kind of got stuck.

Regards

Best Answers

Answers

  • BlackTigerBlackTiger Posts: 1,177Member
    You can't as far as I understand.
    "You can’t just ask customers what they want and then try to give that to them.
    By the time you get it built, they’ll want something new.” Steve Jobs
  • JuhlJuhl Posts: 591Member
    True. But NOT the question :-)
    Follow me on my blog juhl.blog
  • BlackTigerBlackTiger Posts: 1,177Member
    edited 2018-10-12
    Juhl wrote: »
    Of course you can!

    Just read original post:
    I want to add an additional validation code in OnValidate trigger".

    "You can’t just ask customers what they want and then try to give that to them.
    By the time you get it built, they’ll want something new.” Steve Jobs
  • JuhlJuhl Posts: 591Member
    Doesn’t say where.
    OnBefore or After usually is enough for most validation tasks. Like add extra validation.
    Follow me on my blog juhl.blog
  • navbeginnernavbeginner Posts: 23Member
    Thanks a lot experts for your valuable advice.
    I will try to execute your advice and revert
  • navbeginnernavbeginner Posts: 23Member
    Hi Experts,

    All your answers, helped me a lot. I kind of understood after trying out few scenarios that you can do most of the stuff by extending a page or its base table, just need think a bit on the logic. For others we need to go with an work around.
Sign In or Register to comment.