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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How do I turn a flowfield column into a plain Text[35] column on any List?

(1) ShareShare
ReportReport
Posted on by 183
Hello,
 
I have a column where a value is referencing another field in the Sales Invoice Header to the Posted Sales Invoice Line List.
 
When I observe the Posted Sales Invoice Line List, it apparently has a link to something like the row's corresponding customer card on it (unsure if it is from someone's extension or from the Business Central 23.1 update), hindering it from making it searchable if I type the value of the cell as it appears to the eye. So, when I search for 600001 for example, the document is not found even though visually it says 600001.
 
Posted Sales Invoice List (Illustrative purposes only)
Document No.
Unsearchable column
(because it has a link)
Desired searchable column
(plain text)
Searchable External Document Number (Current Output So Far)
I-001-00001600001600001 
I-001-00002600002600002 
I-001-00003600003600003 
 
Using AL, my approach was to introduce another field where it can capture that surface value (the part that is not the link, 600001 for example) and use that for the cell values of the new column.
 
Unfortunately, the starting field on the Posted Sales Invoice List is using FlowField to perform  has caused this link (to the customer card) effect to occur when its intent is to retrieve the Sales Invoice Header's original values (which I checked is also in Text[35] format).

Is there another line that I can add that could unset the link-to-customer-card effect?
 
 

Your help is much appreciated.
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,225 Most Valuable Professional on at
    Hi
    I hope this can help you.  You can get the value from the flowfield field and copy it to the other text field.
    BR
    Gr
  • Suggested answer
    Tech-Lucky Profile Picture
    1,267 Super User 2025 Season 2 on at

    As per your requirements and the code provided above, you need to save the calculated flow field value into a standard field. To achieve this, you will have to modify the "each" record every time your page runs the "OnOpenPage" trigger. However, this may cause performance issues
     
    the corrected code would be as follows. 
     




        trigger OnOpenPage()

        begin

            Rec.CalcFields(ExternalDocumentNo);

            Rec.ExternalDocumentNoTxt := Rec.ExternalDocumemtNo;

            Rec.Modify();

        end;

    I would recommend against using this approach. Instead, you should modify the new field in bulk by creating a batch only once. Then, you can devise logic to directly insert the value of the external document number into the New field each time a new sales invoice line is inserted.

  • Joseph.Candava Profile Picture
    183 on at
    Thanks for your responses.
     
    I have applied this code onto my page extension.
    trigger OnOpenPage()
    
        begin
    
            Rec.CalcFields(ExternalDocumentNo);
    
            Rec.ExternalDocumentNoTxt := Rec.ExternalDocumemtNo;
    
            Rec.Modify();
    
        end;
     

    Upon opening Posted Sales Invoice Lines page, I get an error message saying I lack permissions to use the Rec.Modify(); portion of the code.
    This was an unusual behaviour because I have been granted a "Yes" on the Modify permission for Table Data 113 when I go to the Users page.


    Upon checking "Effective Permissions" under my account, I discovered that my license does not allow me to modify Table Data 113.
    Which license will allow me to perform this?
  • Suggested answer
    Yi Yong Profile Picture
    2,557 Super User 2025 Season 2 on at
    Hello Candava,
     
    To resolve the permissions error, you will need to provide the permission on the pageExt where you run the .Modify() function.
     
     
    Most, if not all, of the posted tables are not modifiable unless permissions are provided on the code/function.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans