Skip to main content
I am attempting to create a workflow rule that searches a range of zip codes to update a custom field on an account record. I'm having difficulty finding the correct syntax to use to express the range; in SQL, this would be expressed as BETWEEN. I read the Java Platform SE 6 Syntax which said to express a range as "value1"_"value2" but I keep

 

receiving an invalid syntax message: Expected: number, date/time, existing text. Apparently, it is expecting the zip code to be a number data type in order to use this syntax but the Account zip field is text (for obvious reasons).  What syntax should I use for Salesforce?

 

2nd part of question: In conjuction with the workflow rule, I need to create a lookup between the Zip Code on account record with Zip Code in custom object so that it will populate the correct Sales Rep on the Account for that zip code. I have the professional edition so don't have access to Apex Triggers. Any other way this is acheivable? I've been playing around with formulas, and V-lookups and can't seem to get this to work.

 

Thanks in advance for any assistance. I'm really stuck.
6 个回答
  1. 2017年2月7日 02:58
    Just thought I would update this in the event that anyone encounters the same issue.

     

    The solution to expressing zip codes by range in the formula builder is to use the following syntax to express the zip code as a number without having to change the data type (which is text) of the zip code field. The below syntax is to express a zip code range from 01001 to 06155:

     

    VALUE([Account].BillingPostalCode)  >= 01001 && VALUE([Account].BillingPostalCode) <=  06155

     

    Still working on trying to get the Account / Custom Object lookup to work but thankfuly I have a call scheduled tomorrow with a SF support member.
0/9000