Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error

(0) ShareShare
ReportReport
Posted on by 3,061

Hi

  I have created C/Al Global variable Customers Data Type record . SubType G/L Entry. On Request Page i have added this field. In C/Al  properties i have set it temporary as Yes. But when i run i get the below error

The Control Customers(2) has an invalid Data Type Record
Customers - OnLookup(VAR Text : Text) : Boolean REPEAT CustomersTemp.INIT; CustomersTemp := "G/L Entry"."Source No."; CustomersTemp.INSERT; UNTIL "G/L Entry".NEXT = 0;


*This post is locked for comments

  • mmv Profile Picture
    mmv 11,467 on at
    RE: Error

    Your below statement is incorrect:-

    CustomersTemp := "G/L Entry"."Source No.";

    Correct statement is

    CustomersTemp."No." := "G/L Entry"."Source No.";

  • Suggested answer
    RainerK Profile Picture
    RainerK on at
    RE: Error

    Hi,

    first you are trying to assign a field to record variable
    CustomersTemp := "G/L Entry"."Source No.";
    ==> Change this line to
    CustomersTemp.Code := "G/L Entry"."Source No.";

    Second I guess that in the property SourceExpr of your field in the request page, you only set the record variable

    Here you must specify the field you want to show


    Best regards
    Rainer

  • Suggested answer
    Tina Menezes Profile Picture
    Tina Menezes 2,582 on at
    RE: Error

    Hi,

    The error means that you cannot add a variable of datatype 'Record' directly on the request page. You should create a variable in C/AL Globals of datatype 'Integer' say 'GLEntryNoVariable'. Now get this variable 'GLEntryNoVariable' on the request page of the report. Navigate to the properties of this variable on the request page of the report and and set the table relation to G/L entry table 17. Now after running the report you will see the request page as below:

    Capture-8.JPG

  • Suggested answer
    Marcellus Profile Picture
    Marcellus 2,735 on at
    RE: Error

    Hi Jsshivalik,

    I think error message gives you the list of accepted data types:

    The control x has an invalid data type Record. The valid data types are: Byte;Integer;Text;Code;Decimal;Option;Boolean;Date;Time;Binary;BLOB;GUID;DateFormula;TextConst;TableFilter;BigInteger;Duration;RecordID;DateTime;BigText;Text;Code;Char;Media;MediaSet.

    If you would like to select from the G/L Entries you should add a variable to store the Entry No. with type Integer and then on the field that you create on the Request Page set the Table Relation in the field properties to "G/L Entry".

    RequestPageTableRelation.png

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans