web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

how to add custom code in between standard formmethods in D365

(0) ShareShare
ReportReport
Posted on by 950

Hi all,

i have a standard form init,where a switch case is included to check the coming record(args.record) from form. i need to add my table as a case there bcas at the end defaultstatement "throw error table %1 is not supported". i tried COC mycode in beginning and next init();, but iam getting error at default statement.

Reference: dirpartyecorescategory form->init(form method).i am using that standard form in my custom form using menu item button

Any suggestions pls

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Test Bot,

    I don't see a way you could suppress this error, as this form is designed to be called from only VendTable or DirPartyTable. The only way you could do this could be to add DirPartyTable/VendTable as a datasource in your custom form (in case you have a relation with these table(s) with the custom table you are using. Then you could set the menu item data source to the new data source you added.

    If this is not the case, It might be a better option to duplicate this form and use the new form from your custom form.

  • TestBot Profile Picture
    950 on at

    Hi gunjan,

    Thanks for the  quick response. i had tried the second option earlier, to close the task.  iwil  try your first option too,bcas i had dirpartytable in customform and relationas well with my primary datasource

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans