How to implement an Alert in Change Request?

Meera_P
Tera Expert

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

 

 

Meera_P_0-1711603485691.png

 

15 REPLIES 15

@Sujatha V M 

I removed that line of code, but not thing return:

Meera_P_0-1711613851717.png

 

@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.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

@Sujatha V M ,

I was able to get it to work. Here is where it failed.

 

Meera_P_0-1711614659342.png

 

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).

 

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.

Sohail Khilji
Kilo Patron
Kilo Patron

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....

LinkedIn - Lets Connect