Friday, June 17

Invoking Task from button when no records in the applet

We may get a requirement to invoke TBUI from button click. However, if there are no records on the applet and you click button, error message is shown as below

“An error has occurred while initializing task '<Task Name>'.(SBL-BPR-00535)
A context business component record is required for task 'SWC Create Customer Account'(SBL-BPR-00542)”


there is a SR in metalink but its clueless to resolve this error

You can do following to get this working.

1.    Create one dummy record and store it’s row Id at Application Level.
       E.g. in System Preference or LOV.
       This will have to be done and deployed on all environments as part of migration activities.

2.    Invoke custom method on button click
3.    In that method, Retrieve record using the row id stored in system preference or LOV.
4.    Invoke Task using method LaunchTaskFromScript of the business service Task UI Service (SWE)

Hope this helps :)

0 comments:

Blogger Widgets