• Ken S (OLD ACCOUNT)
  • NEWBIE
  • 50 Points
  • Member since 2018
  • Salesforce Administrator
  • TRUE Mentors

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies
Can someone tell me how to write a validation rule to search and replace entered text with other text? For example, if the string " Street, " exists in an address field, it should replace it with " St ". Likewise, replace " West " with " W ".  So for example "129 West 81st Street, Apt 2" will become the standarsized USPS formatted "129 W 81st St Apt 2".

(We are currently not on the Household Account model yet so I can use address Google/Cicero/SmartyStreets verificaion APIs and am trying to find some ways to keep our address data somewhat clean in the meantime... Alternative suggestions welcome.)
Can someone help me write a field validation rule(s) that says:

"if (MailingCountry = null or "United States"), AND any other address field (MailingStreet, MailingCity, MailingPostalCode, MailingStateCode = not blank), THEN set MailingCountry = United States AND apply Zip Code rule + Valid State (US) Rules"

where:

Zip Code and Valid State (US) rules are similar to these: https://help.salesforce.com/articleView?id=fields_useful_validation_formulas_account_address.htm&type=5

... In other words, I don't want the user to have to manually select United States from the picklist the first time they enter an address on a bunch of blank address fields -- it should assume the address is in the US, unless they select otherwise, and apply the US field validation rules, unless they select another country.

I realize technically it doesn't need to set MailingCountry again if it's already United States, but I can't think of a better way. If you don't assume both null and United States to mean "United States", then it could potentially overwrite another Country value with United States.

The problem with all the sample field validation rules as written, is that they assume the Country field is blank or United States. But if you remove any of that logic, it forces them to select a country or performs validation rules on records with no addresses and doesn't let them save the Contact if the address fields and country are blank.

Any help is much appreciated! Thanks
Can someone tell me how to write a validation rule to search and replace entered text with other text? For example, if the string " Street, " exists in an address field, it should replace it with " St ". Likewise, replace " West " with " W ".  So for example "129 West 81st Street, Apt 2" will become the standarsized USPS formatted "129 W 81st St Apt 2".

(We are currently not on the Household Account model yet so I can use address Google/Cicero/SmartyStreets verificaion APIs and am trying to find some ways to keep our address data somewhat clean in the meantime... Alternative suggestions welcome.)
I'm working through the Trailhead module on Account and Contact relationships (Learn CRM Essentials for Salesforce Classic > Accounts & Contacts > Understand Account and Contact Relationships https://trailhead.salesforce.com/trails/getting_started_crm_basics/modules/admin_intro_accounts_contacts/units/admin_intro_accounts_contacts_relationships)

It walks you through adding Related Contacts to the Account page, and then creating a related Contact through it. 
User-added image

I run into an error when I create a new Contact off of that screen: "Error: You can't associate a private contact with an account.".
User-added image

So, the steps are:
1: Account page
2: Click [Add Relationship] button in Related Contacts section
3: On the 'New Account Contact Relationship' click the Contact search icon
4: Click the [New] button
5: Enter the Contact info and click [Save]. The pop-up closes. (note: there is NOT an 'Account' field on this page.
6: Click [Save] button on the 'New Account Contact Relationship' page. The error is displayed. 

The only thing I've been able to do is exit these screens, go find the newly created Contact, edit it and add an Account, then go back and add the relationship.

How do I prevent this situation?

Thank you!



 
When i am trying to edit a profile i am getting following error : Permission Create Campaigns depends on permission(s): Read Campaigns.

Please suggest me to resolve this , please find the scrren short attached.

Thanks in advance..

User-added image
I created a Validation Rule. The validation rule (set on Billing_State field), was created to insure if a lead record contact is listing an address in the US or Canada their State can only contain a two letter abbreviation and must be an abbreviation relative to a US State i.e. CA, WA, NY etc. But we get some foreign records coming in that are precluded from Salesforce because in some countries the state/province is more than 2 letters ex: North Rhine-Westphalia Germany = NRW. This is the rule:

AND( 
NOT(ISBLANK(BillingState)), 
OR( 
LEN(BillingState) <> 2, 
NOT( 
CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:" & 
"IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:" & 
"NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:" & 
"WA:WV:WI:WY:PR:" & "AB:BC:MB:NB:NL:NT:NU:ON:PE:QC:SK:YT", BillingState) 
)))

But here is my question, how can I write a Validation Rule that will allow for us to maintain data integrity yet still meet the need of allowing records into Salesforce where its a foreign country with longer state abbreviations?

Thanks in advance for any help,

Glenn
How does on delete Custom URLs From sites. I have tried every thing.
I Deactivated the site.  still the link for del is greyed out. 
gone to  Domain Management Custom URLs and its del link is greyed out too. click the edit link and it takes me back to the site edit page. 
What do i need to do to get rid of the custom URL in the Site pages. 
We currently import data to a field, overwriting old data each time. We'd like to begin importing data to that field and keeping the previous data as well. How can we do this?

My thoughts:
Instead of overwriting field values each import, is there a way to append to the current value? Ex. FIELD1: oldvalue1, newervalue1, importedtodayvalue1

Maybe it's necessary to import to a picklist and create a workflow rule to prepend new data to a field in a list similar to above? How would we go about doing this? We'd like all data to be searchable.

Thanks so much for any help!

Has anyone ever created a formula to proper case fields?

 

Thank you,

Steve