Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to correct call a function in field validation.

Posted on by 25

Hi, how to correct call a parametr function in validation on field. When i trying to compile object i got error. 

To precise i named parametr function CurrFieldNo, I need to call dimension code in field validation, before function insert it to table.  

pastedimage1659683292809v1.png

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    RE: How to correct call a function in field validation.

    Hi, as mentioned by Inge, this error is caused by incorrect parameters in the function. So you should check your function.

    And is it related to Function Overloading? 

    https://www.softwareanswers.co.uk/function-overloading-in-microsoft-dynamics-nav/

    https://www.waldo.be/2018/05/29/function-overloading-in-al/

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: How to correct call a function in field validation.

    I think it would be easier to help you if you share some of your code so we can see what you are trying to do.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: How to correct call a function in field validation.

    You can also start debugging the code, so that it could stop the exact position where the problem is.

    Thanks.

  • Mai lah Profile Picture
    Mai lah 25 on at
    RE: How to correct call a function in field validation.

    I'm trying to set it, but i really struggle.

    I have function, which i calling OnInsert in table, but some part of this function i need to call in "No." and "Item Category Code" in Validation part. I have parametr CurrField (Integer), but I'm not sure what i'm doing wrong.

    In field validation i have Function(CurrField("No.")), same in Item Category Code, but how i should call rest of the code in OnInsert table?

    Thanks for further help.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: How to correct call a function in field validation.

    The problem here is that you call a function with out sending the correct parameters according to the functions signature.

    Functionname(param1,param2)

    So check what parameter you function requires and make sure to pass them all and with correct data type.

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans