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 Can I split the Sell-to Customer name field into first and last name

(1) ShareShare
ReportReport
Posted on by 85
Hi all,
 
There is field in my Posted Sales Invoice, where I'm getting the Text field named Sell-to Customer Name, now I want to split this field into first and last name field, then use them into my page. How can I achieve it?
 
Thanks.
I have the same question (0)
  • Suggested answer
    Valentin Castravet Profile Picture
    31,396 Super User 2025 Season 2 on at
    The customer card has two fields:
     
    • Name
    • Name 2
     
    Both of these are in the posted sales invoice as well. You could use these.
     
     
    Valentin Castravet
    Zander ERP Services
  • MA-22070947-0 Profile Picture
    85 on at
    And folks I am a developer so you can tell me the line of code also 😁
  • Yasas Profile Picture
    55 on at
    Hi,
     
    On the customer page, add two new fields: one for the first name and one for the last name. Name them appropriately, such as "Sell-to First Name" and "Sell-to Last Name". Then, incorporate these fields into the posted sales invoice page and table. For this modification, you need to have AL development knowledge.On the customer page, add two new fields: one for the first name and one for the last name. Name them appropriately, such as "Sell-to First Name" and "Sell-to Last Name". Then, incorporate these fields into the posted sales invoice page and table. For this modification, you need to have AL development knowledge.
     
    BR,
    Yasas.
  • MA-22070947-0 Profile Picture
    85 on at
    Thank you Valentin for your response, but my Names are fully stored on first Name. Can I split that specific field. 
  • MA-22070947-0 Profile Picture
    85 on at
    Hi Yasas,
     
    I don't want to modify my existing page 😞
     
    Thank you. 
  • Suggested answer
    YUN ZHU Profile Picture
    95,595 Super User 2025 Season 2 on at
    If this is a new field you created, sure. Do you want to know how to split it?
    If they are separated by fixed symbols, such as spaces, the following method will be relatively simple.
    Text.Split Method: Splits a string into a maximum number of substrings based on a collection of separators.
    List Data Type: Represents a strongly typed list of ordered objects that can be accessed by index.
     
     
    Hope this help.
    Thanks.
    ZHU
     
     
     

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 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans