Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Truncate reference field variable for short description

JuliaHowells
Tera Expert

On a record producer, we have a reference field that looks at the cmn_location table for Accounts. 

On submission, I want to set the short description to: 

current.short_description = producer.account: 'Order Number: ' + producer.u_order_number + ' - Postal/Zip Code: ' + producer.u_zip_code;

 

However, the account name needs to be truncated to 30 characters. How can I achieve this?

 

1 ACCEPTED SOLUTION

johnfeist
Mega Sage

Hi Julia,

 

If you are already getting the display value for producer.account, you should be able to limit it by using producer.account.substring(0,30);  If that gets funky results then producer.account.getDisplayValue().substring(0,30).

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

View solution in original post

1 REPLY 1

johnfeist
Mega Sage

Hi Julia,

 

If you are already getting the display value for producer.account, you should be able to limit it by using producer.account.substring(0,30);  If that gets funky results then producer.account.getDisplayValue().substring(0,30).

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster