To customize the error message after clicking Save in the sys_report_template.do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Is there any way to customize the error message after clicking 'Save' or 'Insert' or 'Insert and Update' in the sys_report_template.do. Please find the attached screenshots.
Customer want to customize the error message into a meaningful context so that the end user can understand what to do next.
Please help us.
- Labels:
-
ther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Malathi3
Try this. You can keep the meaningful error message in sys_properties ( so that you can change it anytime) and from server side you can read it and display at client side.
1: Create a Display Business Rule
- Navigate to System Definition > Business Rules.
- Click New.
- Fill in the following:
- Name: Custom Report Message Interceptor
- Table: sys_report_template
- Advanced: Check the box.
- When to run: Select display.
- In the Advanced tab, add a script
(function executeRule(current, previous /*null when async*/) {
if (<add your condition here>){
g_scratchpad.customReportError = "Your custom error message goes here.";
}
})(current, previous);
- Create an onload Client script
- Navigate to System UI > Client Scripts.
- Click New.
- Fill in the following:
- Name: Display Custom Report Error
- Table: sys_report_template
- Type: onload
- Isolate script: false
function onLoad() {
if (g_scratchpad.customReportError) {
g_form.clearMessages();
g_form.addErrorMessage(g_scratchpad.customReportError);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
51m ago - last edited 49m ago
Hi @Malathi3 ,
You can customize the messages , the OOB messages are coming from 'sys_ui_message' table , You can search for the exact error in the message field and you can choose application as 'reporting'. in the filter condition. you can customize that thing.
Other way is you can write a business rule for this.
Please mark this response as helpful if it guided you in the right direction.