Anyone know how I can run the Links card from within C/Side - the equivalent of clicking the paperclip icon on the toolbar?
The idea is that a guy on will scan a barcode on a new card, this will then get the item from the barcode and show the Links for that item. As Navision already has the Links card then there's no point reinventing the wheel.
I can't find this card anywhere, theres no link to it from the Record Links table and I've exported all the objects to text files and searched them but come up with nothing.
Life is for enjoying ... if you find yourself frowning you're doing something wrong
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Just create a new form on table 2000000068 (Record Links).
The link is going to be a problem.
You should use the field "Record ID", and that's rather generic. For a recordlink to customer table, the value looks something like "Customer: K04-00001", for an Item Variant: "Item Variant: IT001 ADV,TEST".
So, it starts with the table, followed by the values of the primary key.
So, to open your custom form, just concatenate the right values (table name + ": " + rec.Keyfield1 + rec.Keyfield2), and filter on this... .
Make any sense?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
It is much easier:
You just needs recordref for the record...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Thank you for the code, I had a similar problem but couldn't solve it with SETRANGE, I had to use SETFILTER to make it to work well.
I had to code:
MyRecordRef.GETTABLE(MyRecord);
RecordLink.SETFILTER("Record ID",FORMAT(MyRecordRef.RECORDID));
MyRecordRef.Close;
I don't know why, with setrange didn't filter the Recordlink table properly.