How to implement an Alert in Change Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 10:25 PM
Hi,
How to implement an Alert in Standard Change Request only when state changes to "Implement"?
I need to reminder the requestor to add an attachment. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 01:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 02:52 AM
@Meera_P After query, try to add a log statement and check if its returning any records.
Try getting the count of record as return value and in your client script check like, if the count is 0, then alert else proceed.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 01:33 AM
I was able to get it to work. Here is where it failed.
Is it possible to call a UI Page or UI Action from a client script? The reason I'm asking is that I would like to trigger the UI Page (attachment).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 12:08 AM
you can use below code and check what is value that is being stored in state field
function onChange(){
var service = g_form.getValue('state');
alert(service);
}
check using if condition if alerts get.
Please like or mark correct/Helpful based on the impact of the response.
Thanks & Regards,
Pushpanjali
and check if the alert value matches with the value mentioned in the if condition.
Please like, mark helpful/correct based on the impact of the response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 01:00 AM - edited 03-28-2024 01:04 AM
Hi @Meera_P ,
Why dont you simply create a onload client script with a display business rul like below. OnChange will show only when the state changes to 'implement'
1. Create a display business rule.
2. Create a onload client script.
create a on display business rule that will setup a scratchpad variable
g_scratchpad.hasAttachments = current.hasAttachments();
Now, use this scratchpad variable in your client script to check whether related record has attachment or not.
if (g_scratchpad.hasAttachments){
g_form.addInfoMessage('please add attachement...');
}
else{
// do nothing
}
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....