Skip to main content
edited tags
Link
Samuel De Rycke
  • 9.6k
  • 8
  • 46
  • 73
Post Reopened by Samuel De Rycke
added 614 characters in body
Source Link

I can't findI'm trying to set a waytrigger to link the results of a survey to the relevant case or chat transcript. It seems SurveyForce was not meant to do that but I tried adding a question on the survey that stores the Chatkey. I can then showAnd here is the relevant chat transcript manually but it's fluzzy, and I'd like to do it automatically...code of the trigger :

trigger Test on LiveChatTranscript (before insert) 
{
    set<string> allSurveyStrings = new set<string>();
       
    for (SurveyTaker__c b : trigger.new)
       {
       allSurveyStrings.add(b.Response);
       }
       

    for (LiveChatTranscript a: Trigger.new)
       {
       
       Id SurveyTaker__c= [SELECT id FROM SurveyTaker__c WHERE Response.contains(a.chatKey) IN : allSurveyStrings]
              
       a.SurveyTaker__c = Id SurveyTaker__c;
       }
      
}

However the building fails everytime saying "Didn't understand relationship 'a' in field path"

Any help please ?

I can't find a way to link the results of a survey to the relevant case or chat transcript. It seems SurveyForce was not meant to do that but I tried adding a question on the survey that stores the Chatkey. I can then show the relevant chat transcript manually but it's fluzzy, and I'd like to do it automatically...

Any help please ?

I'm trying to set a trigger to link the results of a survey to the relevant case or chat transcript. It seems SurveyForce was not meant to do that but I tried adding a question on the survey that stores the Chatkey. And here is the code of the trigger :

trigger Test on LiveChatTranscript (before insert) 
{
    set<string> allSurveyStrings = new set<string>();
       
    for (SurveyTaker__c b : trigger.new)
       {
       allSurveyStrings.add(b.Response);
       }
       

    for (LiveChatTranscript a: Trigger.new)
       {
       
       Id SurveyTaker__c= [SELECT id FROM SurveyTaker__c WHERE Response.contains(a.chatKey) IN : allSurveyStrings]
              
       a.SurveyTaker__c = Id SurveyTaker__c;
       }
      
}

However the building fails everytime saying "Didn't understand relationship 'a' in field path"

Any help please ?

Post Closed as "Not suitable for this site" by Eric, Chris Duncombe, crmprogdev, dphil, Boris Bachovski
Source Link

Surveyforce - Link Survey to case

I can't find a way to link the results of a survey to the relevant case or chat transcript. It seems SurveyForce was not meant to do that but I tried adding a question on the survey that stores the Chatkey. I can then show the relevant chat transcript manually but it's fluzzy, and I'd like to do it automatically...

Any help please ?