Hi,
I need help for one of our client.
We need to show the location list from a different company, in a form, and retrieve the record selected by the user into in a field.
Here is what I tried, but it is always showing me the location list of my current company.
recLoc.RESET; //record Location Code, temporary NO
CLEAR(frmLoc); // form Location List
CLEAR(tmpLoc);
tmpLoc.DELETEALL; //record Location Code, temporary YES
recLoc.CHANGECOMPANY("Company Name");
IF recLoc.FIND('-') THEN
REPEAT
tmpLoc := recLoc;
tmpLoc.INSERT;
UNTIL recLoc.NEXT = 0;
frmLoc.SETTABLEVIEW(tmpLoc);
IF frmLoc.RUNMODAL = ACTION::LookupOK THEN
BEGIN
frmLoc.GETRECORD(tmpLoc);
"Location Code" := tmpLoc.Code;
END;
What am I doing wrong?
Thanks
-Julie
P.S: I also tried setting the form view to the recLoc directly instead of the temporary table, same results.
0
Comments
Try to do it easily:
You even do not need to use temporary table...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you very much, it's working