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
nelle3223nelle3223 

Creating Workflow Formula for a Picklist

Here is my current formula ISPICKVAL(Record_Type_Toggle__c, 'Contract') and what I am trying to do is make an email alert send if the Record Type Toggle is "Contract".  The picklist consist of Contract and Change Order and I do not want an email to go out if it is a Change Order. Please let me know of other formulas I could try.

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
phiberoptikphiberoptik

Ok, my mistake was that only lookup fields to the User object are available in criteria. 

 

Change your workflow to "formula evaluates true: and use this formula:

 

AND(
          ISPICKVAL(Record_Type_Toggle__c, 'Contract'),           
          NOT(ISBLANK(Legal_Entity__c ))
)

All Answers

phiberoptikphiberoptik

What is your issue with what you already have? What is your Evaluation criteria set to?


The workflow rule should have:

Evaluation Critiera: created, or edited and subsequently meets criteria

Run Criteria: (do not even need a formula): Record Type Toggle equals Contract

 

Workflow action: Email Alert - create your email alert.

 

This workflow will only fire if the RTT is Contract and when it does fire, the result is an email alert to whomever you set to be the recipient.

nelle3223nelle3223

This formula is still not working, not sure what the issue is.  It is when you go back in to the contract and then we fill in the Legal Entity name and then an email for contracts only will go out once the Legal Entity name is updated. I was going to upload screen shots but it is not allowing me to upload the image, not sure why.

phiberoptikphiberoptik

Your workflow rule has nothing to do with "Legal Entity name".

 

You do not need to use a formula in the workflow you are describing. You can just use "criteria are met" and make your first criteria filter "Record Type Toggle equals Contract". Once you set this value and click Save, the workflow will trigger the email alert. This has no relationship to Legal Entity name, unless you have a second workflow rule that runs off of that field.

 

You cannot copy/paste a screenshot. You need to take it and save it as a jpg or gif file and then upload it by clicking the button that looks like a tree, grass, and blue sky.

nelle3223nelle3223

Yes I do understand how to upload pictures but for some reason when I save the picture as a jpg. or gif. it does not show up.  Sorry, what I am wanting to do is when the Legal Entity name is added to the contract object then I want an email to go out only if the picklist shows contract.  Hopefully this will explain better what I am wanting.

phiberoptikphiberoptik

Ok so its a two part criteria...

 

Then do exactly as I said before, just add the second criteria as Legal Entity name not equal to ______ (blank)

nelle3223nelle3223

Thanks, but when I go into the criteria part for the Legal Entity Name it is not found in the field picklist for criteria. 

phiberoptikphiberoptik

Is the Legal Entity Name field on the same object as the Record Type Toggle field?

nelle3223nelle3223

Yes, they are on the same object and the Legal Entity Name is a lookup field. 

phiberoptikphiberoptik

Then I am not sure what to tell you. Lookup fields should be available to use as criteria in a workflow rule. I just double checked in my own org and I can access lookup fields as criteria.

 

What object is all of this on and what object is the legal entity name?

nelle3223nelle3223

Legal Entity Name is on its own object.  I pasted the info below of how the field is set up

 

Contract and Change Orders Custom Field:Legal Entity
 
Field LabelLegal EntityObject NameContract and Change Orders
Field NameLegal_EntityData TypeLookup
API NameLegal_Entity__c  
Description 
Help TextLegal entity name from contract or change order
Created By Modified By 
Lookup Options:
Related ToLegal EntityChild Relationship NameContracts_and_Change_Orders
Related List LabelContracts and Change Orders
RequiredNot Checked
What to do if the lookup record is deleted?Clear the value of this field.
phiberoptikphiberoptik

Ok, my mistake was that only lookup fields to the User object are available in criteria. 

 

Change your workflow to "formula evaluates true: and use this formula:

 

AND(
          ISPICKVAL(Record_Type_Toggle__c, 'Contract'),           
          NOT(ISBLANK(Legal_Entity__c ))
)

This was selected as the best answer
nelle3223nelle3223

Thanks so much!  :-)