-
1. Re: Show Warning message in IDD User Exit
gopi kolla Jul 6, 2015 11:57 AM (in response to Srinivasappa Munganahalli)In beforeEverything userExit you can use the same OperationResult with
From API it says that it warns and continues execution.....
public static final OperationExecutionErrorType WARNING
BDD should warn user about something and continue execution
-
2. Re: Show Warning message in IDD User Exit
Srinivasappa Munganahalli Jul 6, 2015 10:03 PM (in response to gopi kolla)Gopi,
Thanks for your replay. Yes true there is
OperationExecutionErrorType.WARNING in API, but i am getting how to use it to throw error message on perticular point of time in code.
I tried even with Message, AfterOpenOperationResult.NotificationsHolder but not getting how to make use of those classess.
If you have any sample code please share with me.
Regards,
Srinivas
-
3. Re: Show Warning message in IDD User Exit
Subbu K Jul 13, 2015 12:05 PM (in response to Srinivasappa Munganahalli)You need to use it as below..
In your user exit code, use the if loop as below.
If your condition is true (replace this with your logic)
{
return new OperationResult(new OperationExecutionError("SIP-43000", getLocalizationGate()));
}
Here SIP-43000 needs to be configured in errorCodeBundle.properties as WARNING.
SIP-43000=WARNING||At least one column should be selected.
You can use any acceptable SIP codes. Refer to IDD Implementation guide for more details.
Note that warning message would work only if added in beforeEverything user exit.
-
4. Re: Show Warning message in IDD User Exit
Srinivasappa Munganahalli Jul 13, 2015 9:32 PM (in response to Subbu K)Subbu,
Thanks for your replay, yes i will try the option you mentioned. But only question is as we are using the return statement will code execution continue or will stop at that point?
I need to display warning message and and continue execution. Is this possible?
Regards,
Srinivas
-
5. Re: Show Warning message in IDD User Exit
Srinivasappa Munganahalli Jul 19, 2015 8:59 AM (in response to Srinivasappa Munganahalli)Subbu,
I tried the option you mentioned above. But, after executing the return statement with WARN the control is coming out without executing the custom user exit code.
Is there any other way to show WARN message and continue execution.
Regards,
Srinivas
-
6. Re: Show Warning message in IDD User Exit
Teena.c Oct 16, 2015 6:01 AM (in response to Srinivasappa Munganahalli)Hi Srinivas ,
Did you find a solution to the problem mentioned? Show the WARN message and continue execution ?
Thanks
-
7. Re: Show Warning message in IDD User Exit
Srinivasappa Munganahalli Oct 16, 2015 6:07 AM (in response to Teena.c)No Teena, was not able to implement that. Please let me know if you have some idea on the same
-
8. Re: Show Warning message in IDD User Exit
Shirshendu Deb Roy Feb 12, 2021 9:03 AM (in response to Srinivasappa Munganahalli)1 of 1 people found this helpfulHi Srini,
Not sure whether you were able to implement it.
However, I have found the solution and implementation technique. We will use the Message Bundle properties file of IDD.
You need to follow the below steps:
1. If your intention is just to show the warning message and continue with your regular work, then edit your message bundle file and add one key-pair value like this:
warning_message=This is a warning
Here, key = warning_message and value = This is a warning
This value will appear in IDD screen.
2. In your handler code, if you want to show this message then you need to use getLocalizedMessage method of the interface BDDMessagesLocalizationGate.
For example, if you want to show the above mentioned warning message in data tab after opening one record in IDD application, then you need to write the code like below under afterOpen method of the IOpenOperationPlugin.
notifications.addMessage(Message.warning(getLocalizationGate().getLocalizedMessage("warning_message", null)));
Here, notifications is the object of AfterOpenOperationResult.NotificationsHolder class and below is how you can get it for primary base object record.
AfterOpenOperationResult.NotificationsHolder notifications = openOperationResult
.getPrimaryObjectNotifications();
Let me know if you need any help.