Running Links Card from C/Side v5

Toddy_BoyToddy_Boy Member Posts: 231
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. :cry:
Life is for enjoying ... if you find yourself frowning you're doing something wrong

Answers

  • kinekine Member Posts: 12,562
    This form is not part of NAV objects you can manage. I recommend to create own form and use it. You just needs to base it on the correct table and fill correctly the PK (or filter it correctly).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    Indeed.

    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
  • kinekine Member Posts: 12,562
    Waldo wrote:
    Indeed.

    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?

    It is much easier:

    You just needs recordref for the record...
      MyRecordRef.GETTABLE(MyRecord);
      RecordLink.SETRANGE("Record ID",MyRecordRef.RECORDID);
      MyRecordRef.Close;
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    right ... :oops:

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Toddy_BoyToddy_Boy Member Posts: 231
    Thanks for the advice, apparently it is impossible to call the new links feature from within c/side so I worked around it.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • borjaghborjagh Member Posts: 19
    kine wrote:
    Waldo wrote:
    Indeed.

    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?

    It is much easier:

    You just needs recordref for the record...
      MyRecordRef.GETTABLE(MyRecord);
      RecordLink.SETRANGE("Record ID",MyRecordRef.RECORDID);
      MyRecordRef.Close;
    

    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.
Sign In or Register to comment.