Modal tied to UI Action with condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 01:09 PM
Hi Everyone,
I am not sure if there is a way to do this or not, but we have code that worked fine until we added more declinations reasons that are now tied to a type_of_decline that should only display 4 of them when the type_of_request and type_of_decline is exception or the other 4 when the type_of_request and type_of_decline is correction. This is a decline UI action. Is there any way to get the code below to recognize this and if not, what would you recommend please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 02:50 PM
In a g_modal, the reference type field doesn't come with a query or a filter that we can rely on... (AFAIK).
There maybe one way out of this...
Use a Choice type field instead and have a glideAjax go get the Declination reasons from server and return them to the Choice field as an array of objects ... something like:
choices: [{
displayValue: 'Duplicate',
value: 'duplicate'
},
{
displayValue: 'Canceled',
value: 'canceled'
}
]
This way your server script can return only the correct 4 records based on your conditions.