validation rules doesn't work in Blueprint when it is validated using function?
I have tried to create a validation rule in the deal module. it works if I try to create a deal manually or if I try to update the empty field inside a deal.
but when I try to update the field via the blueprint mandatory field, it seems the validation rules doesn't work, like this:
here is the code I use
- entityMap = crmAPIRequest.toMap().get("record");
- markingCode = entityMap.get("Marking_Code");
- response = Map();
- if(!markingCode.contains("/"))
- {
- response.put('status','error');
- response.put('message','Your marking code is written in the wrong format');
- }
- else if(markingCode != markingCode.toUpperCase())
- {
- response.put('status','error');
- response.put('message','Marking code should be written in the UPPERCASE letter');
- }
- else
- {
- response.put('status','success');
- }
- return response;