function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AbAb 

Will i always get 15 digit id if i delete 3 characters from 18 digit id.

Hello,

Id can be on 15 or 18 digits.

If i delete the last 3 characters from my 18 digits id, will i always get the 15 digits id.

thank you for replly
Best Answer chosen by Ab
VinayVinay (Salesforce Developers) 
Hi Sandrine,

You can try to trim not delete the last 3 digits of 18 digit id.

Something like below.

TRIM(LEFT(Id Field, 15))

https://help.salesforce.com/articleView?id=bi_integrate_data_prep_recipe_formula_field_stringFunctions_trim.htm&type=5

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Sandrine,

Can you explain the context in this scenario?

You can use 15 digit id and that should be problem even if you truncate last 3 digits in 18 digit id.

Thanks,
Vinay Kumar
AbAb
Hi Vinay,
I didnt understand.
If i delete last 3 characters from 18 digit will i get the 15 digit id
VinayVinay (Salesforce Developers) 
Hi Sandrine,

You can try to trim not delete the last 3 digits of 18 digit id.

Something like below.

TRIM(LEFT(Id Field, 15))

https://help.salesforce.com/articleView?id=bi_integrate_data_prep_recipe_formula_field_stringFunctions_trim.htm&type=5

Thanks,
Vinay Kumar
This was selected as the best answer
praneet hegdepraneet hegde
youtube to mp3 downloader (https://ytmp3mate.com)