You need to sign in to do that
Don't have an account?
CodeRedKyle
Task Validation Rule
I want an error message when someone attempts to assign a task of a certain type if they don't assign it to the correct person.
Here is what I have:
(OwnerId <> "Kyle Hill") && (ISPICKVAL (CallType, "PROGRAM MANAGEMENT - NEW ENROLLMENT"))
I get no errors when saving this rule, but also no errors no matter who I assign to the task.
Any ideas? (i'm very new at this)
Thanks in advance!
I got it figured out a different way, you could try.
Use this code instead:
And( ( OwnerId <>"005000000018b2a"), ( ISPICKVAL( CallType, "PROGRAM MANAGEMENT - NEW ENROLLMENT")))
All Answers
Your ownerid is going to be a userid value, not the name. Something like "00500000001Bc2e".
You are getting the smilies because you typed code, and didn't use the "insert code" button (the clipboard with the c on it). Any time you have semicolon and paranthesis ; ) next to each other ;) you will get the smilies.
If you go to manage users in setup, select "users" , then find the user you need the ID for.
select their full name, then look at the URL your browser is set to
it will be something like https://cs3.salesforce.com/00570000003IqBj
The string that starts with the 005 and is 15 digits long is the user id.
Thanks, I did that - but no change. Should I have the userid in ""? or not
if you could correct my (OwnerId <> "005XXXXXXXXXXXX") && (ISPICKVAL (CallType, "PROGRAM MANAGEMENT - NEW ENROLLMENT"))
can you correct what i have?
It's active, and no syntax errors - when I go and make a new task, the error doesn't show - it just saves
actually - now that I changed to the user ID it shows syntax error ")" missing
I got it figured out a different way, you could try.
Use this code instead:
And( ( OwnerId <>"005000000018b2a"), ( ISPICKVAL( CallType, "PROGRAM MANAGEMENT - NEW ENROLLMENT")))
I really appreciate your help - for some reason I'm still not getting the result I'm looking for. No matter who I put as the owner of the task, no errors show up.
How would I do that?
I am assuming you have system administrator access to the system. on any screen, near the top, you should have several links; including setup and logout in between these should be a link called "System Log" click that link to open the log window.
I would recommend, once you find that link, you do the following:
navigate to the new task, set it up and get ready to save, then open the log window (this will limit what is in the log to relevant information), then save.
You can then copy and paste the log window results to your reply.
This is what it looks like on my instance:
5:15:01 DEBUG - *** Beginning Task Validation Rule Evaluation for null Start Time: 20090819191501.066 Rule Name: checkval Error Condition Formula: And( ( OwnerId <>"005000000021k2a"), ( ISPICKVAL( CallType ,"Email"))) Value(s) Found: OwnerId=005000000021k2a , Type=null Result: PASS - Continue End Time: 20090819191501.066 *** Ending Task Validation Rule Evaluation for null
Jim - Thanks so much - by looking at the system log I found that I was looking at the wrong field, instead of call type, it just needed to be "type"
Thanks so much for your help - You've taught me a lot today!
Could you please tell about the Task validation