Skip to main content
Hi, 

 

I have a validation rule for a field that uses a roll up summary field for child objects that have the 'Primary' tick. This is basically to make sure only one child object can be set to 'Primary'. Formula below: 

 

Primary_Contact_Addresses__c > 1

 

Now this works fine but as part of some mass data uploading, we essentially have multiple objects, all set to 'Primary'. So when there are 3+ objects the validation stops you from trying to make the changes. We really want our users to start making these changes and little down the problem but this validation is setting us back but we need some validation. 

 

Is there a formal that basically understands the state change, so that it only blocks changes when that number changes from 1 to anything higher? Which should allow a user to incrementally un tick the wrong ones? 
4 件の回答
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    2021年3月3日 10:06
    HI Shay

     

    You coudl try:

    ​​​​​​AND(ISCHANGED(Primary_Contact_Addresses__c), PRIORVALUE(Primary_Contact_Addresses__c)=1, Primary_Contact_Addresses__c > 1)