Skip to main content
lane_h
Helper ⭐️
December 2, 2015
Question

Remove Test Survey Data

  • December 2, 2015
  • 13 replies
  • 243 views
We are trying to do some cleanup from some test surveys we did when we were implementing and trialling. 

The surveys won't allow me to delete them because they have responses. 

Any ideas on how to remove these?

13 replies

alex_legay
Helper ⭐️⭐️⭐️
October 27, 2016
Richard,

While I am not saying any of our customers would actually do this, that may open up the door to manipulate survey data. I am not sure if that is why our product doesn't allow a clean way to remove responses now, but it might have played a part during design. Maybe product can chime in here :)

My request would be to be able to create a survey and specify it as a test which would allow you to manipulate the responses and eventually delete it along with the responses at the same time.
kristin_f3c469
Contributor ⭐️⭐️⭐️⭐️⭐️
October 27, 2016
Good idea - designate a survey as Test up front. As a result it is excluded from the NPS reports and scores. That's really all we were trying to do.
amber_boaz
Contributor ⭐️⭐️⭐️
November 10, 2016
I was asked to delete a particular survey (all I had was title) and its related data. Here are the queries I ran (and the order in which I ran them):
  1. select id from JBCXM__SurveyResponse__c where JBCXM__SurveyParticipantId__r.JBCXM__SurveyMaster__r.JBCXM__Title__c = 'YOUR SURVEY NAME HERE'
  2. select id from JBCXM__SurveyParticipant__c where JBCXM__SurveyMaster__r.JBCXM__Title__c = 'YOUR SURVEY NAME HERE'
  3. select id from JBCXM__Survey__c where JBCXM__Title__c = 'YOUR SURVEY NAME HERE'
The process is
  • run query 1
  • delete records with resulting ids from query 1
  • run query 2
  • delete records with resulting ids from query 2
  • run query 3
  • delete records with resulting ids from query 3
  • drink a glass of wine because you deserve it. :-)
I hope this saves someone else from an afternoon of trial and error! 🙂