I am getting the titled error
System.StringException: Ending position out of bounds:99
for the below code:
CusObj2.ProdName__c=CusObj2.Name__c.substring(0,99);
All I want to do is truncate the name in this trigger to 99 characters or fewer. Please advise.
Pls note I am getting this error only when deploying a change set - it passes the same testClass in my sandbox.