You need to sign in to do that
Don't have an account?
SFDC 2017
How to use mid() in Apex class?
Hi All,
I have one requirement that i need to use mid() String function in Apex class.I have a set called zip and in that i am adding all the Account.Billingpostal code .for this i need to fetch only first 5 to return.I used like zip.add(String.mid(Account.BillingPostalCode, 1, 5));
But error i scoming as variable string doesnot exist.How to do this mid() and add it to the set called Zip with all account Postal code.
Kindly help me on this
I have one requirement that i need to use mid() String function in Apex class.I have a set called zip and in that i am adding all the Account.Billingpostal code .for this i need to fetch only first 5 to return.I used like zip.add(String.mid(Account.BillingPostalCode, 1, 5));
But error i scoming as variable string doesnot exist.How to do this mid() and add it to the set called Zip with all account Postal code.
Kindly help me on this
Returns a new String that begins with the character at the specified zero-based startIndex with the number of characters specified by length.
This method is similar to the substring(startIndex) and substring(startIndex, endIndex) methods, except that the second argument is the number of characters to return.
Example-
Thanks
Rupal Kumar
http://mirketa.com