Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Find STA No. (in email body)
- Opportunity Opp = [SELECT id, STA_No__c Opportunity WHERE Id = :matcher.group(0)];
- String staNo = email.plainTextBody;
- Pattern staPattern = Pattern.compile('STA[0-9]{4}');
- Matcher matcherSta = staPattern.matcher(staNo);
- if (matcherSta.find())
- Opp.STA_No__c = matcherSta.group(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement