Simple script to hide a Notification field based on another Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:03 AM
Hi All:
This is probably very simple, but I am jut not getting it right. Basically, if the Account Type is Premium Savings as shown below, I don't want the "Requested Exception Term for Account field circled in red to show on the notification. When the Account Type is not Premium Savings, I want it to show. The script I have currently is shown below. Can someone take a look and possibly reply back with the changes i need to make please?
Current Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:20 AM - edited 03-15-2024 07:24 AM
var acctType = current.account_type;//here type the backend name of account type and fetch the value
if (acctType != "Premium Savings") {
template.print("Requested exception rate for account : " + current.requested_exception_rate_for_account);
}
use the above script but from body remove the ${requested_exception_rate_for_account} and in place of this call the mail script
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:40 AM
Hello,
So, something like this, the only thing is it says the months are undefined on the notification, so what am I missing here please? Also, when I do have Premium Savings for the account type, I don't want this to show at all and it shows the same way as the screen shot below when the account type is Certificate of Deposit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:00 AM
@Annette Kitzmil did you remove ${requested_exception_rate_for_account} ? and can you please show me how are you calling the mail_script please share some screen shot
Thanks
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:01 AM - edited 03-15-2024 08:02 AM
@Annette Kitzmil and try replacing below
template.print('<p>Requested Exception Term for Account: </p> ' +current.getValue(requested_exception_term_for_account) + 'months');
Thanks
Swathi