As you can tell…I am a newbie when it comes to AX. With that said I am having trouble with the below method…I created a display method returnin a real value type…but when I try to return a string…I am getting an error. Can someone point out what is wrong with the below code; do I need to declare a string type??
display InventTrans GetItemID()
{
InventTrans inventTrans;
;
select * from inventTrans where inventTrans.InventTransId == CDFailureAnalysis_1.InventTransId;
return inventTrans.ItemId;
}
This has been solved…Thanks!!!
sandy1
August 17, 2009, 11:44pm
3
Hello
I have the same problem. How did you fix the error?
SPN-AX
September 23, 2009, 3:59pm
4
Sandy,
the returning type should be ItemId, not InventTrans. it should be like: display ItemId GetItemID() {…}
display InventTrans GetItemID()
{
InventTrans inventTrans;
;
select * from inventTrans where inventTrans.InventTransId == CDFailureAnalysis_1.InventTransId;
return inventTrans.ItemId;
}
Harish
September 23, 2009, 4:15pm
5
the returning type should be ItemId, not InventTrans. it should be like: display ItemId GetItemID() {…}
display InventTrans GetItemID(){…
Just to clarify, the above should be - “display ItemId GetItemId()”
Is this correct?
SPN-AX
September 23, 2009, 5:22pm
6
yes Harish. sorry, i should have be clear on that. Thanks.