I know how to get from Rec to RecRef. Using RecRec.SETABLE(Rec).
My problem would be, how to get from RecRef back to Rec? The reason is that I did some processing in RecRef, and now I want the processed results back in Rec, so that I can pass it to a function. I know I can of course change the function to take in RecRef instead of Rec, but that would be a lot of work.
Any easy way to do this? I have thought of assigning each field in RecRef to Rec in lines and lines of codes. But this solution seems silly. Any other way to perform this? Help appreciated!
0
Answers
I think that's the best solution.
I think that's not a good solution. What if the table will be expanded by another field?
If one is to transfer a record to a recordreference, then the other ...
BTW: the other does NOT transfer filters. Only values.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
My apologies. You are correct. GETTABLE is used to get data from Rec to RecRef, and SETTABLE is used to get data from REcRef to Rec.
In my NAV version, the description for both GETTABLE and SETTABLE were the same. This led me to believe both the functions were similar. Description for help files below:
GETTABLE (RecordRef)
Use this function to make a recordref variable use the same table instance as a record variable.
SETTABLE (RecordRef)
Use this function to make a recordref variable use the same table instance as a record variable.
2. Find the field "Attribute", below the field "Subject"
3. Set this field to [Solved]
4. Submit your posting
Regards
Never mind! I also missunderstood you. Because you said I thought you're already using SETTABLE, but you want to pass a set of records to your function. That could be a problem. But if you only want to pass one single record to your function then SETTABLE is the way to go for you. Good luck!