I want to run a field update that looks for quotation marks in the text field entry, and have it remove the quotations.
I know how to write the formulas, but I just don't know how to do so looking for the quotation marks because salesforce is looking for some kind of text in between quotation marks.
So, the "new field value" on the workflow field update would look like this:
IF(
CONTAINS(Company, (the quotation mark would go here) ),
SUBSTITUTE(Company, (the quotation mark would go here), ""),
null)
...What goes in the area I typed "(the quotation mark would go here)" ?
3 answers
When you want to find a quotation in a string, you have to use a backslash.
From Salesforce help: Use the backslash (\) character before a quote or backslash to insert it as a literal value in your output. For example, "Trouble\\Case \"Ticket\": " in your formula displays Trouble\Case "Ticket": on detail pages.
If the update comes from an external system, then I would suggest using a workflow rule associated with a field update, for which the formula would be:
SUBSTITUTE( Company , "\"", "")
I tested it in my org and it works fine, however I did my test as if it was an input from a user, not from an external system.
Workflow rules are not always triggered when records come from an external system, it depends on the technnology you are using...
If this doesn't work , then you will have to find out the technology that is used by the marketing system (surely Web-to-Lead or one of Salesforce's APIs).