Hi there,
I have the following code:
SetMyRecord(VAR MyRec : Record)
MyGlobalRec.COPY(MyRec);
//or even MyGlobalRec := MyRec;
My parameter has MyRec.COUNT equal to 3. After I copy it to MyGlobalRec with either of the above ways then MyGlobalRec.COUNT is equal to 1. Can someone explaing why please? And how can I copy all 3 records to my global variable?
Note that I get the same results if I try to copy MyRec into Rec.
Thanks in advance.
Answers
insert them into MyGlobalRec.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
this must work.after this line, MyGlobalRec must have 3 records.. can you post the all of your code please? i want to see how you filtered the record,when you called SetMyRecord function, etc..
also, can you check the messages in the shown above?
One way to solve the problem is cycling through all (MARKED) records and create a filter string based on primary key...
e.g.
Hope this helps...
Ayhan, thanks for your reply.
MyRec does NOT have any filters at all. And just to make sure, I do a MyRec.RESET just before I call the SetMyRecord function.
Here is what you asked:
Hi Krokce, thanks for your reply.
I did a MyRec.MARKED just before I call the SetMyRecord function and returned FALSE which means that it doesnt contain any marked records.
Can someone try it plz, its quick.
The solution is looping through and inserting the entries from MyRec to MyGlobalRec: