Announcements
No record found.
Hi, I am trying to skip init implementation of a form (ex: HcmPersonIdentificationNumber) without overlaying from a specific call. Is there a way to do so?
*This post is locked for comments
You can use extensions to *add* logic, not for removing code from existing methods or adding some extra conditions there. You would have to design your solution in a different way - let us know what exactly you're trying to achieve if you need our help. Nevertheless some things simply can't be done without overlayering.
We would like to extend HcmPersonIdentificationNumber as such it becoms standalone form and opens showing all id docs without going through HcmWorker form ( which filters for the selected worker), but can't be done since the init method is checking the caller dataset. Do we have to recreate the form or what do you suggest?
It's quite easy. If you look at how the datasource's init() works, you'll find that if you use right Args when calling the form, the filter for the current user won't be added.
Namely:
init() will set common and dirPersonCaller to the empty DirPerson record, therefore the condition if (dirPersonCaller.RecId) won't be met and no range will be added.
There is just one more trick. AX still creates a dynamic link to the record in Args, therefore you must remove it. Create a handler for the Initialized event of the datasource and call this from there:
sender.queryBuildDataSource().clearDynalinks();
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Alexey Lekanov 2
Henrik Nordlöf 2 User Group Leader