I'm working on a Salesforce coding issue. Let me preface this by saying I'm not a developer or Salesforce expert.
What language is this?
Data Type FormulaThis formula references multiple objects IF (Fulfillment_Submission_Form_URL__c <> "" && CONTAINS(Fulfillment_Submission_Form_URL__c, "qualtrics"), Fulfillment_Submission_Form_URL__c & (IF (CONTAINS(Fulfillment_Submission_Form_URL__c,"?SID="), "&", "?")) & (IF (CONTAINS(TEXT(Type__c), "Site Visit"), "ContactId="&Statement_of_Work__r.Contractor_Contact__c& "&CoachType="&SUBSTITUTE(Statement_of_Work__r.Work_Type__r.Name," ","%20")& "&CoachName="&SUBSTITUTE(Statement_of_Work__r.Contractor_Name__c," ","%20")& "&InitPartId="&Initiative_Participation__r.Id& "&InstitutionName="&substitute(substitute(SUBSTITUTE(Institution_Name__c," ","%20"),")",""),"(","")& "&AccountId="&Initiative_Participation__r.Participating_Institution__r.Id& "&TodaysDate="&TEXT(TODAY())& "&SOWLineItemId="&Id& "&LeaderCollege="&Initiative_Participation__r.ATD_Leader_College_Status__c& "&SVRCompleted="&TEXT(Count_of_Site_Visit_Fulfillments__c)& "&SVRRequired="&TEXT(Number_of_Work_Units_Allocated__c), IF (CONTAINS(TEXT(Type__c), "Feedback"), "InitPartId="&Initiative_Participation__r.Id& "&SOWLineItemId="&Id& "&ReportYear="&Statement_of_Work__r.SOW_Year__c& "&UserId="&Contractor_User_Id__c& "&InstitutionName="&substitute(substitute(SUBSTITUTE(Institution_Name__c," ","%20"),")",""),"(",""), "") )) ,"")Essentially it's pulling a link from another product we've integrated it with. We then take the basic link and reformat it to add parameters.
The problem is when it pulls in some parameters (ex: CoachName) the Coach entered their name in strange formats like: John (Coach) Doe.
So when the script outputs a URL that includes parameters it breaks at the &CoachName=John%20(Coach)% portion of the URL. Any easy way to work around this by modifying the script? Unfortunately we DO need that (Coach) identifier because the system we push to grabs that as well.