web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Please help explain RecordRef and Variant

(0) ShareShare
ReportReport
Posted on by 50

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.

I have the same question (0)
  • Suggested answer
    Bilal Haider Profile Picture
    442 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,993 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,116 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans