Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2018-12-10 01:43 AM
I am trying to set field A value which is of type value list and getting values fro User Group.
Field A = User A, User B, User C, User D from some GroupBasedOnRole
Now based on some condition need to set value of field A to
if field B = ABC then field A should be set to User A
if field B = XYZ then field A should be set to User B
In case i use this code
<script>
var integration = {
fieldID:"16179",
valueID:"240",
};
var valueArray = new Array(1);
valueArray[0] = integration.valueID;
ArcherTech.UI.GenericContent.GetInstance().setFieldValue(integration.fieldID, valueArray, '');
</script>
How can i get value ID for that particular user.
2018-12-11 02:16 AM
Ileya it is showing correctly now but not saving.
2018-12-11 02:18 AM
You probably have some restrictions defined for Incident Coordinator RP field. Like you allow only Coordinators. Try to make it temporary to be All Users.
2018-12-11 02:26 AM
Hi Ileya,
I made this change included everyone, it is saving blank still.
2018-12-11 02:29 AM
You may have some Rules defined. I recommend to create new RP and test it with it. Ofc you need to change fieldId in the script.
2018-12-11 02:50 AM
Did everything but no success..created new field from scratch added everyone..added value..it is displaying correctly again..but not saving on click of save button.
2018-12-11 02:58 AM
Well, I just tested the script in my own environment. It works fine.
I recommend to initiate setRecordPermission NOT during the load, but per some button click. And test it. Otherwise, have no idea as user id is correct.
2018-12-11 05:56 AM
Hi Ileya ,
Thanks for your help..will see some other alternative..it is still not working.. Please let me know one more thing am using script in shift handover but it is not working..is it something like that it works only in Security incidents application.
2018-12-11 06:00 AM
Script is not application specific. It will work in any application.
2018-12-11 06:10 AM
What could be the reason as i have just typed
<script type="text/javascript">
Sys.Application.add_load(function() {
alert("test");
});
<script>
but it is not firing.
2018-12-11 06:12 AM
Do you put custom object on the layout?
Do you use Edit or View or Both modes in custom object?