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.
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.
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?
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.
Hi Srinivas ,
Did you find a solution to the problem mentioned? Show the WARN message and continue execution ?
No Teena, was not able to implement that. Please let me know if you have some idea on the same
1 of 1 people found this helpful
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.
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
Let me know if you need any help.