See if Record Link exist by customer

RLukassenRLukassen Member Posts: 2
edited 2010-04-16 in Navision Financials
Does anybody know how I can show at the customer card that a Record link exist (table 2000000068) for this customer (same as comment exist, with a boolean). The data is in a Datatype RecordID. We use Nav 5.0.

Comments

  • jreynoldsjreynolds Member Posts: 175
    This is already there in the status bar (just to the right of the work date).
  • RiddickRiddick Member Posts: 4
    Have a similar problem. While having Navision automatically display LINKS in the status bar is nice, I need to create a CU that does some processing for all jobs that have an attachment. So far, I am unable to format the Record ID field. What type is it, really, and how does one format a lookup key?

    TIA.
  • DaveTDaveT Member Posts: 1,039
    Hi,
    You will need to create the recordid you need. This is done by using a recordref type variable
    e.g.

    CustRecRef.OPEN(18);
    CustRec.GET( '20000' );
    CustRecRef.GETTABLE( Custrec );
    recid := CustRecref.RECORDID;
    CustRecRef.CLOSE;

    where CustRecRef is a recordref variable and CustRef is a record variable
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • andy76andy76 Member Posts: 616
    Hello,

    Variable called recid which datatype has?

    I am doing a similar thing for Items:

    I am on trigger Form - OnAfterGetRecord() of form 30 Item Card

    and defined these local variables:

    ..
    Name DataType Subtype
    lRecRecordLink Record Record Link
    lRecRefItem RecordRef
    lRecItem Record Item
    ..

    lRecRefItem.OPEN( DATABASE::Item);
    lRecItem.GET("No.");
    lRecRefItem.GETTABLE( lRecItem );



    lRecRecordLink.SETCURRENTKEY(Company);
    lRecRecordLink.SETRANGE(Company,COMPANYNAME);

    lRecRecordLink.SETCURRENTKEY("Record ID");
    lRecRecordLink.SETRANGE("Record ID",lRecRefItem.RECORDID);

    MESSAGE(FORMAT(lRecRefItem.RECORDID));

    IF lRecRecordLink.FINDFIRST THEN
    gBoolAttachmentPresence := TRUE
    ELSE
    gBoolAttachmentPresence := FALSE;


    lRecRefItem.CLOSE;


    The message is correct for example 'Item : ABC'

    but filter

    lRecRecordLink.SETRANGE("Record ID",lRecRefItem.RECORDID);

    is not applied. Why this?
  • andy76andy76 Member Posts: 616
    Can nobody help me?
    What is wrong?

    Thanks
  • ufukufuk Member Posts: 514
    andy76 wrote:
    ...
    The message is correct for example 'Item : ABC'

    but filter

    lRecRecordLink.SETRANGE("Record ID",lRecRefItem.RECORDID);

    is not applied. Why this?

    From NAV help: ...you cannot set filters on a RecordID.
    Ufuk Asci
    Pargesoft
  • andy76andy76 Member Posts: 616
    Dear ufuk,

    I don't find this thing in the help.
    Is there another way to solve my problem?

    Thank you very much
  • ufukufuk Member Posts: 514
    Probably you can get into a loop and query the values...
    Ufuk Asci
    Pargesoft
  • miciebmicieb Member Posts: 13
    NAV help says that you cannot set filters on RecordID but you can apply textfilters on it. So I think you can filter like:

    RecLink.SETFILTER("Record ID",FORMAT(prec."Record ID"));


    The FORMAT is essential, no other way of filtering (except flowfield in the table using a recordid field) will work.

    grtz.
    Straight forward... Move!
Sign In or Register to comment.