Hi all,
I have a client method that calls a server method to create an item based off some properties on the context item.
How can I display the new item in a tab after it is created by the server method?
Hi all,
I have a client method that calls a server method to create an item based off some properties on the context item.
How can I display the new item in a tab after it is created by the server method?
aras.uiShowItem(ItemTypeName, ItemID);
Thanks for this, I guess I am unclear on how to return the ID of the new item from the server side method to the client side method that called it.
if your server method looks like
... Item item=newItem(ItemType, "add"); item.setProperty(...); Item res=item.apply(); return res;
you can get the result like this
var res=aras.applyMethod("MyMethod",""); var resItem=aras.newIOMItem(""); resItem.loadAML(res); aras.uiShowItem(resItem.getType(), resItem.getID());
if your server method looks like
... Item item=newItem(ItemType, "add"); item.setProperty(...); Item res=item.apply(); return res;
you can get the result like this
var res=aras.applyMethod("MyMethod",""); var resItem=aras.newIOMItem(""); resItem.loadAML(res); aras.uiShowItem(resItem.getType(), resItem.getID());
Thank you, I will give this a try. I was missing this:
var resItem=aras.newIOMItem(""); resItem.loadAML(res);