+ Start a Discussion
Zach SmithZach Smith 

Run IF statement only if created date is not today, or connection user

I have the following validation code:

 

ISPICKVAL(Status__c, "Pending")

 

How to make this applicable ONLY if the created date is not today, or if the modifying user is a connection user (salesforce to salesforce user)?? Is this even possible on Group Edition??

SteveMo__cSteveMo__c

I'm not sure how you would handle the Salesforce to Salesforce User part, but if you want to create a VR for your Status picklist you could use something like this:

 

AND(ISPICKVAL(Status__c, "Pending"),  DATEVALUE(CreatedDate) <> TODAY())

or like this depending on whether you want to make Status = "Pending" required or not.

 

 

AND(NOT(ISPICKVAL(Status__c, "Pending")),  DATEVALUE(CreatedDate) <> TODAY())

 

 

kaplanjoshkaplanjosh

You can check if the connection user is the  updating user by adding the following clause:

 

$Profile.Name <> 'Partner Network'