- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2020 02:06 PM
Once we define a survey as "Anonymize response", we want to hide survey user' name on whatever records related to their response, such as "survey instance" table. However, survey user's name is still shown in the fields of "sys_updated_by" and "sys_created_by" on the response records. These two user fields are controlled by platform mechanism and they will be updated automatically by current logged in user.
The solution we have been trying is to use "impersonate" functionality. We tried to impersonate as 'Guest' user when taking anonymize survey. However, it's not going to work either because "impersonate" is not allowed for all login users. For example, 'Abel Tuter' cannot impersonate as 'Guest' user.
Do we have any anonymous mode to solve this issue? Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Multiple Versions
-
Survey Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2020 04:12 PM
Hi xinyao,
Use this script for after business rule on 'asmt_assessment_instance_question'
set conditions on when to run
var a = current.instance.sys_updated_by;
var b = current.instance.sys_created_by;
if(a || b){
var gr = new GlideRecord('asmt_assessment_instance');
gr.get(current.instance);
gr.autoSysFields(false);
gr.sys_updated_by = '';
gr.sys_created_by= '';
gr.update();
}
current.autoSysFields(false);
current.sys_updated_by = '';
current.sys_created_by= '';
current.update();
Thank you,
Vikram

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2020 02:12 PM
Hi,
There exists an option of autoSysFields that can be used whenever Survey record is inserted. Haven't tested but can be one of possible options.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2020 02:22 PM
Thank you for the suggestion! By reading from document, "autoSysFields(false)" will ignore all of these fields, such as "sys_updated_by", "sys_updated_on", "sys_mod_count", "sys_created_by", and "sys_created_on". However, we still want to keep updating "sys_updated_on" and "sys_created_on". Can we specify which fields to be updated?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2020 02:24 PM
Hi xinyao,
we can't specify, it will disable updating all system fields
Thanks,
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2020 02:29 PM
Thank you Vikram. Do you know any other approach?