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

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
    32,113 Super User 2026 Season 1 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
    98,637 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,870 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,138 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 915 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans