Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Creation of menu item using code in D365FO

$
0
0

I used  the following code for creating a new output type menuitem using code https://github.com/HichemDax/D365FONinjaDevTools/blob/master/D365FONinjaDevTools/AddItemsToFolder/AotElementCreate.cs 


I called this C# code from my runnable class in D365 using the following code:

class OACreateMenuItem
{
public static void main(Args _args)
{
str menuitemnameOA, labelnameOA;
menuitemnameOA = "MenuItemCreationTest";
labelnameOA = "Menu Item Test";
OACreateNewMenuItem.AotElementCreate::CreateMenuItem(2, menuitemnameOA, labelnameOA);

info("Menu Item Created");
}

}

While executing it, I encountered an exception error.

Could anyone tell me how to resolve this error?

Thanking in advance.


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>