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
EdithEdith 

Workflow rule for account

Hi,

 

I am trying to create a workflow rule to generate a task when the account address is updated. 

However, tasks should not be created following a lead conversion when the address was blank and a brand new one is added.

I have this formula but it doesn't work... Can you please help? 

 

AND(NOT(

OR(ISBLANK( BillingCity),ISBLANK( BillingStreet), ISBLANK( BillingPostalCode ),

 

OR(
ISCHANGED(BillingCity),ISCHANGED( BillingStreet), ISCHANGED( BillingPostalCode )))))

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/
AND(
NOT(ISNEW()),
OR(
NOT(ISBLANK(PRIORVALUE(BillingCity))),
NOT(ISBLANK(PRIORVALUE(BillingStreet))), 
NOT(ISBLANK(PRIORVALUE(BillingPostalCode)))),
OR(
ISCHANGED(BillingCity),
ISCHANGED( BillingStreet), 
ISCHANGED( BillingPostalCode )))

 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below formal as reference:

 

Evaluation Criteria Every time a record is created or edited

Rule Criteria OR( ISCHANGED( BillingCity ) ,ISCHANGED( BillingStreet ),ISCHANGED( BillingPostalCode ))

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

chris.noechris.noe

Try this:

 

AND(NOT(ISNEW()), 

OR(
ISCHANGED(BillingCity),ISCHANGED( BillingStreet), ISCHANGED( BillingPostalCode )))))

 

ISNEW should return TRUE when you create a new Account as part of the lead conversion and therefor the rule won't fire on lead conversion.

EdithEdith

Hi Ankit,

 

Thanks for your reponse, the rule doesn't work as it creates a task every time.

I only would like it to create a task when the account address was not blank to start with.

 

A lead can be converted without an address (which is ok), but once the account is edited and a new address added - from blank), the task shoudl not be created.

It should only be created when the address was not blank to start with. That's why I was trying to use NOT(BLANK

 

Thank you,

Edith

EdithEdith

Hi Chris,

Thank you, I tried and it still creates a task when the address is blank.

Edith

Steve :-/Steve :-/
AND(
NOT(ISNEW()),
OR(
NOT(ISBLANK(PRIORVALUE(BillingCity))),
NOT(ISBLANK(PRIORVALUE(BillingStreet))), 
NOT(ISBLANK(PRIORVALUE(BillingPostalCode)))),
OR(
ISCHANGED(BillingCity),
ISCHANGED( BillingStreet), 
ISCHANGED( BillingPostalCode )))

 

This was selected as the best answer
EdithEdith

Thanks Steve! It worked perfectly, I owe you 2 beers now!

Steve :-/Steve :-/

only 2?!?  I gotta rasie my rates!!!  ;-D