2

You missed some characters in your code (e.g. @). Instead, I'd specify which characters are allowed. For example: var re = new RegExp('[^a-z0-9]','i'); Forbids anything other than letters and numbers. Also, it's rather standard practice to write the regular expression in short form: var re = /[^a-z0-9]/i; The other syntax is really meant for dynamic ...


2

Your logic is backwards. flag = true; for(Lead_Custom__c objChild : mapParentIDAndChild.get(objId)) { if(objChild.Terminated__c == false){ flag = false; break; } } if(flag == true) { updateList.add(new Contact(Id = objId , Terminated__c = true)); } ...


1

In a validation rule I think you will be unable to account for leap years. In this case I would just convert your 20 years, 5 months and 15 days to days. Birthdate > (TODAY() - 7467) If you are building this out in Apex you might be able to use isLeapYear() to help you but it would be quite messy. https://developer.salesforce.com/docs/atlas.en-us....


1

Yes whenever there is an insert/update on any object from trigger the validation rule will fire You can read more on order of execution in the official documentation here


1

You can't make the Standard Address field mandatory on the the field or the page layout. There is an idea in place for this, though the last comment from Salesforce is that this it not on the current roadmap https://trailblazer.salesforce.com/ideaView?id=08730000000BqlNAAS


1

There are different ways you can achieve your requirement:- Using custom permission:- Create a custom permission and assign that permission to the profile which uses API to create/Update opportunity. $Permission.isAPIUser Using profile - Check for Profile Id of the user $Profile.Id Using custom field on User record - Create a custom checkbox field on user ...


Only top voted, non community-wiki answers of a minimum length are eligible