+ Start a Discussion
Felipe FernandesFelipe Fernandes 

tasks validation rule

Hi!

 

I have to make the "assigned to" field required based on the input of the "owner" field.

For example: if  "owner" is x, "assigned to" is required. If  "owner" is y, "assigned to" is not necessary.

 

Can someone please help with this.

 

thanks!

Best Answer chosen by Admin (Salesforce Developers) 
SporterSporter

Try:

 

 

OwnerId = "00520000001F5Ym" &&  ISPICKVAL(Priority__c, "")

 

Where the ID I have is the user I want to check for (can be got from the manage users section) and Priority__c is a custom picklist field where the value is blank.

 

So what this is saying is if the Assigned to field is this user and the picklist field is blank then give a validation error.

 

All Answers

SporterSporter

Can you be more clear as to what you want as the Owner field and assigned to are the same field on tasks/events, are you referring to another object that is connected, a custom field for owner or what exactly?

Felipe FernandesFelipe Fernandes

I'm sorry, i will try to be more clear.

I have the field "Assigned to" (Owner) and a custom field (type: picklist).

I have to make the "custom field" required based on the input of the "Assigned to" field.

For example: If Assigned to is "one", custom field is required. If Assigned to isn't "one", custom field is not required.

 

thanks!

SporterSporter

Try:

 

 

OwnerId = "00520000001F5Ym" &&  ISPICKVAL(Priority__c, "")

 

Where the ID I have is the user I want to check for (can be got from the manage users section) and Priority__c is a custom picklist field where the value is blank.

 

So what this is saying is if the Assigned to field is this user and the picklist field is blank then give a validation error.

 

This was selected as the best answer
Felipe FernandesFelipe Fernandes

worked! thanks!