
Hi,
I'm new to BC tech in this part and i have difficulties to understand about using RecordRef and Variant to pass between functions.
I'm using BC 17 onprem currently.
First, about the RecordRef:
1. I want to know which table RecordRef contain at the time. Is it only using recordref.number to get the object number of the record or is there another way to do it ?
2. If i'm using number to get the record number, is there a way to get the record name ?
Second, about the Variant: I have variant with "Item" type. Questions are:
1. Is there a way to know which variant record name ?
2. Is there a way to convert/copy variant including their filters, marks to specific record ?
Thank you.
Hi,
RecordRef:
1. Yes you can use RecRef.Number to get the ID of the record that RecRef contains.
2. You can use RecRef.Caption to get name of record.
Variant:
1. Yes, you can get it as
MESSAGE(FORMAT(MyVariant));
2. You can COPY Variant and its filters as:
myRec2.COPY(myVariant) but the myRec2 and variant should be of same record sub-type that you assign variant to.