New answers tagged

0

As mentioned on the comments, you'll need to control that on Contact level. Something like the code below should be ok AND( $Profile.Name != 'Marketing', ISPICKVAL(Account.Assigned_Status__c, 'Press') ) Keep in mind that as I said on the comments, this will prevent anyone from creating / editing Contacts with that status, but it will not prevent ...


6

That's because SFDC matches the whole field against your REGEX, your whole Email__c is not only ';.+$', plus $ is a special character, so you need something like this REGEX( Email__c, '.*[;.+$].*') If you're only interested in ; character then put it like this '.*;.*' Another point is that if you are only curious about ; character you can use CONTAINS(...


0

You need to use Workflow Rules, not Validation Rules. In the WF Rule: Check if Account Minimum has changed, and if Account was Active. AND( Active_Proactive_field__c = 'Active', Account_Minimum_field__c > PRIORVALUE(Account_Minimum_field__c) ) Create a Field Update to change Account to Proactive. This will change Active_Proactive_field__c if ...


0

You can create a validation rule or use addError method


0

When a Lead Conversion occurs, the transaction scope includes: Creating or updating an Account Creating or updating a Contact Creating an Opportunity (optional) Updating the Lead to indicate it is converted and the related accountId, contactId, opportunityId Thus, 4 DML operations occur in the transaction and if any of them fail, the conversion fails So, ...


0

Okay, I have finally fixed this. The issue was that when I installed the Sales Navigator plugin, I hadn't already had a Task type, so it defaulted to the LinkedIn task. I was able to fix it by following the instructions under "KEY CALLOUTS" here: Note: Installation of Sales Navigator will create new Record Types for Tasks and assign custom ...


0

the validation rule has to run on the Account -- and you need to map three fields from the Lead to the Account : (1) some signal that Account was created by lead conversion; (2) leadsource and (3) company_type__c – cropredy Dec 16 '20 at 1:49


0

It's not possible... I had to create an Apex Class.


1

Use below Validation Rule. NOT(REGEX(ShippingCity, "[a-zA-Z]+")) Thanks


0

After a support call with Salesforce Tier 2, they were able to determine that there was an added validation that the lead required a product defined and that the test would work if I also omitted the Company Name. It may have to do with the changes that Jeferson mentioned.


1

Validation rules are in a way the reverse of how we programmers normally think of things. If the validation rule evaluates to true, the validation trips and prevents the record from being saved. We're not making a rule to determine what is valid, we're making a rule to tell us what is invalid. So when you say "all 3 fields must not be blank", that ...


0

Your formula is not correct, you are mixing AND() and &&. You should use one or the other but not both: AND( ISPICKVAL(Immediate_Relatives__c, "Yes"), ISBLANK(Relative_Full_Name__c), ISBLANK(Relationship_to_you__c), ISBLANK(Status__c) )


3

Validations only know about your current record. They don't know about other records in the object. You will need to write code to query other records, and put the validation check in that code. For example in a trigger.


0

To restrict editing record to 7 days since its creation you can use a simple Validation Rule TODAY() - CreatedDate > 7 You can change CreatedDate to your custom field to restrict editing based on its value, but remember to make sure this value can not be changed after it has been populated.


3

Yes, regex can do this. NOT(REGEX(SomeCustomField__c, '^(?s)\\d{9}(\\s+\\d{9})$')) || REGEX(SomeCustomField__c, '(?s)(\\d{9}).*\\1') The trick here is that we go in to "single line mode" (?s) to allow . to match newlines, then we check each nine-digit string (\\d{9}) with any intervening characters (.*), followed by the same group again (\\1).


1

The parentheses were out of place, so it only triggered when both fields were blank. You probably meant to use OR for the missing fields: AND( ISPICKVAL(StageName, "Closed Won"), OR( ISBLANK( Contact_Name__c ), ISBLANK( Closed_Won_date__c ) ) ) Note, however, that this is a bad user experience (UX). Each validation rule should ...


0

The fields are marked required. Hence, got the error message regardless of the value of the stage


1

How about adding ISCHANGED(Start date) into you formula. This way the validation rule only runs if the Start Date is changed and when 7 days from Start date had passed, if that's your only requirement. So it will look like below: AND(ISCHANGED(Start date), your existing formula to validate 7 days from Start date)


Top 50 recent answers are included