on 02-01-2016 2:29 PM
Hello everybody,
I have the requirement to implement the same check on different transactions (like Lead and Opportunity).
I want to be a good programmer that's why I thought I can create my reuse library, implement an action and call this action from onSave event of my extended Lead and Opportunity.
My problem is, that I have to throw an error message if the check isn't successful.
(Something like: "Please enter XXX")
It is not possible to raise this error message from the reuse function, isn't it?
Does someone has another Idea how to solve this problem without writing the same code 3 or 4 times in different xbos?
Thanks for your help.
Best regards,
Astrid
Hi Astrid,
You can still use a ReuseLibrary. The respective check method returns a collections of Text in wich you write all errors occuring during the check. In the calling action you can then loop over the result of the library method and simply raise a generic message to which you pass the according text.
If you also need to distibguish between info, warning and error you can create a Dummy BO that contains an element for the message ype (Info, Warning, ...), the text, and whatever else you need. The result of your check message would then be a collection of elments of the Dummy BO.In your reuse library method you then simply create elements of the Dummy BO fill it with the respective info and add it to the result collection. Again in the calling action you can loop over the result and raise the message you want.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
thanks for your Answer. It was really Helpful,
I have now implement it with a Text Collection as return Parameter.
I fill the Collection with all Texts I need as Error Message.
In the XBO I loop over this collection and raise an error Message every Time.
I created the message like:
message MsgSomething text "&1":LANGUAGEINDEPENDENT_LONG_Text;
I'm not sure if the Data Type is the best one.
Do you have any better suggestions?
However it woks for me now.
Best regards,
Astrid
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.