Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-07-02 06:56 AM
Hi,
I would like to pull the value selected in a certain value-list field but without using the DOM element of the field.
I need it because the filed is hided from the layout....
I was trying to use ArcherTech.UI.GenericContent.GetInstance().getFieldValue(..) but it doesn't fetch the value...
Is there a different "get" function I shall use for Value-List fields?
2018-07-02 03:10 PM
Thanks.
Try changing the values list to either drop-down or radio-button if it's configured as values popup and see if that helps.
Advisory Consultant
2018-07-02 07:39 AM
Tamar if the field is off the layout the only way to get it's value is to use the REST API and retrieve record content.
I'd recommend putting the field in a section on the layout and have a DDE hide that section. Then the custom object will be able to get it's value.
Advisory Consultant
2018-07-02 08:30 AM
We have added the field to the layout but still not getting it's value ArcherTech.UI.GenericContent.GetInstance().getFieldValue(..) any idea why?
2018-07-02 08:32 AM
Tamar can you post the complete code for the custom object?
Advisory Consultant
2018-07-02 09:16 AM
Hi David,
Here is the code:
<script>
Sys.Application.add_load(function() {
var value = ArcherTech.UI.GenericContent.GetInstance().getFieldValue(19754);
});</script>
<script type='text/javascript' src='/RSAarcher/api/scripts/clientX/archerXParms-SN.js'></script>
<script type='text/javascript' src='/RSAarcher/api/scripts/clientX/archerUiExtension.js'></script>
<script type='text/javascript' src='/RSAarcher/api/scripts/clientX/archerClientExtensionX.js'></script>
<script type='text/javascript' src='/RSAarcher/api/scripts/clientX/archerClientExtensionServiceNow.js'></script>
I want to get the value before the scripts I am running afterwards.
2018-07-02 03:10 PM
Thanks.
Try changing the values list to either drop-down or radio-button if it's configured as values popup and see if that helps.
Advisory Consultant
2018-07-03 08:56 AM
Worked! Thanks David!