• Alex Christensen 1
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
I created a RGEX formula to only allow for spaces and alphabetical letters when creating a contact. However, the rule only needs to be implemented for two profiles. When I add the profile name into the formula it blocks the user from creating a contact completely even if both fields are filled out correctly. 

OR(NOT(REGEX(FirstName,"^[a-zA-Z_ ]*$")),NOT(REGEX(LastName,"^[a-zA-Z_ ]*$")))&& $Profile.Name = "Customer Support" || $Profile.Name= "Technical Support"
Hello,

I need to allow for spacing in this RGEX rule can someone identify what I need to remove? this is being used as a validation rule to prevent users from adding special characters in a contact. 

REGEX(FirstName, ".*([^a-zA-Z]+|\\s{2,}).*") || REGEX(LastName, ".*([^a-zA-Z]+|\\s{2,}).*")
I am trying to create a validation rule to prevent users from leaving first or last name blank or entering in anything aside from alphabetical values. The rule works however I need to allow for spacing. Can someone identify what I need to remove from the formula to allow for spacing? 

REGEX(FirstName, ".*([^a-zA-Z]+|\\s{2,}).*") || REGEX(LastName, ".*([^a-zA-Z]+|\\s{2,}).*")
I am trying to Migrate a rollup from the free edition for RollupHelper to Declarative Lookup Rollup Summaries. The purpose of the rollup is to total the totalprice of specific products associated with the opportunity. But I keep encountering the following error. 

Error:
Relationship Criteria: Relationship Criteria 'CONTAINS( Product2.ProductCode ,"Unify") OR CONTAINS( Product2.ProductCode ,"Ext Camera") OR CONTAINS( Product2.ProductCode ,"WT") OR CONTAINS( Product2.ProductCode ,"CellCam") OR CONTAINS( Product2.ProductCode ,"WXP") OR CONTAINS( Product2.ProductCode ,"W450") OR CONTAINS( Product2.ProductCode ,"W461") OR CONTAINS( Product2.ProductCode ,"W460") OR CONTAINS( Product2.ProductCode ,"W410") OR CONTAINS( Product2.ProductCode ,"WXL") OR CONTAINS( Product2.ProductCode ,"Camera") AND opportunity.iswon = TRUE AND NOT(CONTAINS( Opportunity.Name,"CG Internal Marketing/R&D EVO Devices") AND NOT(CONTAINS( Opportunity.Name,"Conga") AND NOT(CONTAINS( Opportunity.Name,"Demo") AND NOT(CONTAINS( Opportunity.Name,"Return") AND NOT(CONTAINS( Opportunity.Name,"Credit") AND ISPICKVAL(Opportunity.Type = "New Business") AND opportunity.closedate >= 2020-01-01' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is 'unexpected token: ',''

The formula I am using is as follows:
CONTAINS( Product2.ProductCode ,"Unify") OR CONTAINS( Product2.ProductCode ,"Ext Camera") OR CONTAINS( Product2.ProductCode ,"WT") OR CONTAINS( Product2.ProductCode ,"CellCam") OR CONTAINS( Product2.ProductCode ,"WXP") OR CONTAINS( Product2.ProductCode ,"W450") OR CONTAINS( Product2.ProductCode ,"W461") OR CONTAINS( Product2.ProductCode ,"W460") OR CONTAINS( Product2.ProductCode ,"W410") OR CONTAINS( Product2.ProductCode ,"WXL") OR CONTAINS( Product2.ProductCode ,"Camera") AND opportunity.iswon = TRUE AND NOT(CONTAINS( Opportunity.Name,"CG Internal Marketing/R&D EVO Devices") AND NOT(CONTAINS( Opportunity.Name,"Conga") AND NOT(CONTAINS( Opportunity.Name,"Demo") AND NOT(CONTAINS( Opportunity.Name,"Return") AND NOT(CONTAINS( Opportunity.Name,"Credit") AND ISPICKVAL(Opportunity.Type = "New Business") AND opportunity.closedate >= 2020-01-01))))

User-added image
 
The process builder is mapping the RMA field over to a text field on the case. This is the conditional formula portion but will not save due to the error. 

OR(ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Power"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "No Communication (CCM)"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Software"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Assembly defect"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Abuse"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "No problem found"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Other" ), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Connectivity"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Customer Induced Defect (CID)"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "NTF"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "Sound"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "OEM"), ISPICKVAL([Opportunity].RMA_Root_Cause__c, "TBD")), AND($User.Department <> "Accounting"), AND($Profile.Name <> "CG System Administrator"), AND($Profile.Name  <> "System Admin - Custom")))
 
I am trying to Migrate a rollup from the free edition for RollupHelper to Declarative Lookup Rollup Summaries. The purpose of the rollup is to total the totalprice of specific products associated with the opportunity. But I keep encountering the following error. 

Error:
Relationship Criteria: Relationship Criteria 'CONTAINS( Product2.ProductCode ,"Unify") OR CONTAINS( Product2.ProductCode ,"Ext Camera") OR CONTAINS( Product2.ProductCode ,"WT") OR CONTAINS( Product2.ProductCode ,"CellCam") OR CONTAINS( Product2.ProductCode ,"WXP") OR CONTAINS( Product2.ProductCode ,"W450") OR CONTAINS( Product2.ProductCode ,"W461") OR CONTAINS( Product2.ProductCode ,"W460") OR CONTAINS( Product2.ProductCode ,"W410") OR CONTAINS( Product2.ProductCode ,"WXL") OR CONTAINS( Product2.ProductCode ,"Camera") AND opportunity.iswon = TRUE AND NOT(CONTAINS( Opportunity.Name,"CG Internal Marketing/R&D EVO Devices") AND NOT(CONTAINS( Opportunity.Name,"Conga") AND NOT(CONTAINS( Opportunity.Name,"Demo") AND NOT(CONTAINS( Opportunity.Name,"Return") AND NOT(CONTAINS( Opportunity.Name,"Credit") AND ISPICKVAL(Opportunity.Type = "New Business") AND opportunity.closedate >= 2020-01-01' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is 'unexpected token: ',''

The formula I am using is as follows:
CONTAINS( Product2.ProductCode ,"Unify") OR CONTAINS( Product2.ProductCode ,"Ext Camera") OR CONTAINS( Product2.ProductCode ,"WT") OR CONTAINS( Product2.ProductCode ,"CellCam") OR CONTAINS( Product2.ProductCode ,"WXP") OR CONTAINS( Product2.ProductCode ,"W450") OR CONTAINS( Product2.ProductCode ,"W461") OR CONTAINS( Product2.ProductCode ,"W460") OR CONTAINS( Product2.ProductCode ,"W410") OR CONTAINS( Product2.ProductCode ,"WXL") OR CONTAINS( Product2.ProductCode ,"Camera") AND opportunity.iswon = TRUE AND NOT(CONTAINS( Opportunity.Name,"CG Internal Marketing/R&D EVO Devices") AND NOT(CONTAINS( Opportunity.Name,"Conga") AND NOT(CONTAINS( Opportunity.Name,"Demo") AND NOT(CONTAINS( Opportunity.Name,"Return") AND NOT(CONTAINS( Opportunity.Name,"Credit") AND ISPICKVAL(Opportunity.Type = "New Business") AND opportunity.closedate >= 2020-01-01))))

User-added image