Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

How to use Optional Parameters in Function?

(0) ShareShare
ReportReport
Posted on by 40

Hey everybody

I have a question about Optional Parameters in AL.

I found a Documentation about Methods in Dynamics 365.

And in this Documentation they talked about optional Parameters.

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-methods#example-1

Is it possible to use optional parameters at the moment?

And if yes, how can I use them in my own Function?

Thanks for your help :)

Dominic

Categories:
  • Dominic Saladin Profile Picture
    40 on at
    RE: How to use Optional Parameters in Function?

    I don't think this is possible...

  • Dominic Saladin Profile Picture
    40 on at
    RE: How to use Optional Parameters in Function?

    Thanks for your Answer.

    It's a bit disappointing, but now I know.

    I hope someday, Dynamics will be programmed in C# :)

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: How to use Optional Parameters in Function?

    yes you can declare below is the example.

    procedure UpdatePurchaseOrder(  CRUD_Type: Option Create,Update,Delete): Boolean

    var

    Begin

    End;

  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,637 Moderator on at
    RE: How to use Optional Parameters in Function?

    There is no optional parameter for your function.

    The optional parameter is only available for the BC build-in programming method, such as CALCDATE.

  • Verified answer
    T.I.A Profile Picture
    1,760 on at
    RE: How to use Optional Parameters in Function?

    I don't believe it's possible. I think the article was saying that some built in methods have optional variables.

    community.dynamics.com/.../297091

    Let me know how you get on

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans