Notifications
Announcements
No record found.
Hi,
MyMethod(RecId recId,Set _updateElementChecked = new Set(Types::Int64), Set _browsFormChecked = new Set(Types::String))
I want to make the 2 "Set" parameters as optional => I means when I call this method I can write this:
MyMethod(RecId recId);
in X there's no optional parameters, or at least they're not called optional but default value. You can do it like this:
MyMethod(RecId recId, Set _updateElementChecked = null, Set _browsFormChecked = null)
This will allow you to call the method like MyMethod(recId).
Adrià Ariste - Senior technical consultant @ Axazure - Read my blog!
In your code the Set parameters are already optional, since you provide default values for them.
Hi Basma,
As Nikolaos said, the parameters in your method are already optional.
Initialize the parameters in the method declaration. This will make the parameter an optional parameter.If no value is provided in the method call, the default value is used.
Simple test, you will find that the method can be called normally.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 559 Most Valuable Professional
André Arnaud de Cal... 464 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader