Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Get the vaule of a table field and display it as a message

Posted on by Microsoft Employee

hi there,

im finding it hard to find any docs or tutorials about this, i want to get some fields of a table and display them as a message just to get the idea on how it works.  I've tired


 varText := cctables.FIELD(Name);
 MESSAGE(varText);

------


 varText := cctables.Value(Name);
 MESSAGE(varText);

but doesnt work. Anyone can please link any documentation or share a solution it will be greatfull

Thanks

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Get the vaule of a table field and display it as a message

    Hello,

    Variable name DataType
    CustomerRecref RecordRef
    MyFieldRef FieldRef
    CustomerNo Code
    TABLE 2
    Text constant name ConstValue
    Text000

    Customer name has changed to %1.

    Documentation()

    OnRun()
    CustomerNo := '50000';
    CustomerRecRef.OPEN(18);
    MyFieldRef := CustomerRecRef.FIELD(1);
    IF MyFieldRef.ACTIVE THEN BEGIN
    MyFieldRef.VALUE(CustomerNo);
    MyFieldRef := CustomerRecRef.FIELD(2);
    MyFieldRef.VALUE('Contoso');
    CustomerRecRef.MODIFY;
    MESSAGE(Text000, MyFieldRef.VALUE);
    END

    Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get the vaule of a table field and display it as a message

    note: im using NAV 2015 wich c/al editor

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans