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.
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?
Comments
TIA.
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
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
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?
What is wrong?
Thanks
From NAV help: ...you cannot set filters on a RecordID.
Pargesoft
I don't find this thing in the help.
Is there another way to solve my problem?
Thank you very much
Pargesoft
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.