function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RRRizeRRRize 

Validation rule help - update checkbox if address is edited/updated...

I have 4 address fields (Address / City / State / Zip Code) and a checkbox (which I would like to keep hidden).

 

Is it possible to create a validation rule that will check the checkbox if an address already exists but is edited/updated in any way?  If so, please help with the code.

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Here you go

 

Workflow Rule

Address Update WFR1

 

 

Workflow Rule Detail

  
Rule NameAddress Update WFR1ObjectContact
Active Evaluation CriteriaEvery time a record is created or edited
Description 
Rule CriteriaOR( 
ISCHANGED( Address__c ), 
ISCHANGED( City__c ), 
ISCHANGED( State__c ), 
ISCHANGED( Zip_Code__c ))
Created BySteve Molis, 2/3/2012 4:01 PMModified BySteve Molis, 2/3/2012 4:02 PM

 

Workflow Actions

Immediate Workflow Actions

TypeDescription
Field UpdateUpdateCheckbox1

 

PS.  You owe me a beer (these terms are non-negotiable)

 

PPS.  And I drink these -> http://beeradvocate.com/beer/profile/863/7971 also non-negotioable 

All Answers

Steve :-/Steve :-/

It can't be done with a Validation Rule (that's not what VR's do)  if you're on EE or UE you could do that using a Workflow Rule (WFR).  Which edition of SFDC are you on?

RRRizeRRRize

I'm on EE.

 

How do I do it with a workflow rule?

 

Thanks so much!

Steve :-/Steve :-/

Also, which object are these fields and on what are the API Field Names?

RRRizeRRRize

It's on the contact object.  The address fields are as follows:

 

Address__c

City__c

State__c

Zip_Code__c

 

the Checkbox is:

 

ADDRESS_UPDATE__c

 

 

Thanks for your help.

Steve :-/Steve :-/

Here you go

 

Workflow Rule

Address Update WFR1

 

 

Workflow Rule Detail

  
Rule NameAddress Update WFR1ObjectContact
Active Evaluation CriteriaEvery time a record is created or edited
Description 
Rule CriteriaOR( 
ISCHANGED( Address__c ), 
ISCHANGED( City__c ), 
ISCHANGED( State__c ), 
ISCHANGED( Zip_Code__c ))
Created BySteve Molis, 2/3/2012 4:01 PMModified BySteve Molis, 2/3/2012 4:02 PM

 

Workflow Actions

Immediate Workflow Actions

TypeDescription
Field UpdateUpdateCheckbox1

 

PS.  You owe me a beer (these terms are non-negotiable)

 

PPS.  And I drink these -> http://beeradvocate.com/beer/profile/863/7971 also non-negotioable 

This was selected as the best answer
Steve :-/Steve :-/

also, I'm not sure why you have that checkbox field.  I think you'd be much better off just using Field History Tracking on this 4 fields.

RRRizeRRRize

Thanks so much my friend.  This was quite helpful as it worked wonderfully!


As far as the checkbox goes, well... I just need to know if the address is updated so I can push that update to another system.  The checkbox will get cleared after the update.

 

Regarding the beer, I sent you a private message!  Hope you're in NY! : )