+ Start a Discussion
Manish Kumar 23Manish Kumar 23 

Java Script in salesforce.

Hi All,

Can we use split  Java script functionality in salesforce.
My requirnment is if are entering Account name as Abc Itd.
then using split functionality it should take Abc limited as account name.
Ruwantha  LankathilakaRuwantha Lankathilaka
you can use apex String split functioin to split same as javascrip

List<String> parts = filename.split('seperator');


Manish Kumar 23Manish Kumar 23
Thanks for the reply Is there any example that will help me in doing this
SamuelDeRyckeSamuelDeRycke

Javascript is only recommended when you're on a visualforce page. If that is not the case you can use workflows or triggers to make changes to record names. Which implementation you pick may be different depending on the amount of filtering you want to do.

If you aren't sure how do to either, you probably want to start with going through the salesforce developer training videos or workbooks.

Manish Kumar 23Manish Kumar 23
Hi Sdry, Thanks for your response. Can we replace the part of account name with workflow ltd-->limited,Corp-->Corporate, etc
James LoghryJames Loghry
Manish Kumar 23,

Yes, you can either use a Workflow Rule with a Field Update that constructs the Name based on a Formula.

Or if that does not work, then you can construct the Name in a custom Apex Trigger as well.