Public Surveys - Associate with Case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 12:37 PM
Hello Community, I'm facing this next issue:
I've created a new Public Survey when a case is resolved. Since we are sending this surveys to external email users added as string on the case form, there is no ooo way to associate the Survey with the Case Number.
I read many articles mentioning the possibility of creating a new survey question with the method value set to 'Default answer from script' and using this script:
var caseNum = RP.getParameterValue('caseNum') || '';
string_result = caseNum;
Lastly, it would be necessary to add to the Survey URL:
&caseNum=${number}.
The URL is created perfectly with the correct caseNum, but in the Survey, the field does not get populated.
Could someone help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 01:57 PM - edited 09-16-2024 02:00 PM
Seems:
var caseNum = RP.getParameterValue('caseNum') || '';
is returning a boolean value, try just:
var caseNum = RP.getParameterValue('caseNum');
RenderProperties-APIRP-getParameterValue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 06:02 AM
Hi bert,
It's returning empty Case Number field anyways:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 07:29 AM
Hopefully, some other Community member can assist you. One familiar with that API and how to use it.