You need to sign in to do that
Don't have an account?

String Contains Sub String from right
In the Physical County i will be getting string such as 'Wayne County' or 'Oakland County' so my requirement is to remove the county and just update as 'Wayne' or 'Oakland' Below code is working fine, but i need to check if physical_county__c contains 'County' string onky from the right side that is if we have last 6 sub string as County then enter the IF condition.. Can any one help me out on this.
Below is my code,
Below is my code,
IF(fa.Physical_County__c.contains('County')){ fa.Physical_County__c = fa.Physical_County__c.substring(0,fa.Physical_County__c.length()-6);