Apparently you can declare an array as a return value in NAV. But I am not sure if you actually can use it.
I have never seen this being used anywhere.
Try this in worst case. Concatenate the two values which you want to return each separated by a comma like this “val1,val2” and return the concatenated string. Then split the text into 2 decimal values using selectstr function.
Here is a example codeunit that I use for web service calls where a page is not conducive to retrieving the right data. The function returns an array of production order component record ids for the given production order. The web service client can then read the components individually by record id.
PROCEDURE ProdOrderComponentKeys@1000000004(ProdOrder@1000000000 : Record 5405) returnIDs : ARRAY [50] OF Text[100];
VAR
ProdOrderComponents@1000000001 : Record 5407;
RecordRef@1000000002 : RecordRef;
RecordID@1000000003 : RecordID;
Index@1000000004 : Integer;
BEGIN
WITH ProdOrder DO BEGIN
ProdOrderComponents.RESET;
ProdOrderComponents.SETCURRENTKEY(Status, “Prod. Order No.”,“Prod. Order Line No.”,“Line No.”);
What are “reference parameters” and how to declare them?[:P]
OK Got it Sorry![;)]
Tick the VAR field at the beginning of your parameter field specified in the local window and the specified parameter becomes a reference parameter.[8-|]