cancel
Showing results for 
Search instead for 
Did you mean: 

Online Request in Workflow with button created for me via code

Former Member
0 Kudos

Hi friends,

I have an doubt...


How to create a button in custom.js to perform the function "Online Request"
I tried as follows:
1 - Create a menu item / button to online request in the eclipse sdk
2 - generate workflow
3 - go to workflow.js and copy the created function "
menuItemCallBack_...()" to custom.js
4 - Remove the menu item / button created in workflow
5 - create a button via code in the event custom.js "custombeforeshowscreen" and "onClick" event of the button, call the function "
menuItemCallBack_...()".
But it is not working, is returning the error message that I set

Anyone know a solution?
thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

What version of SUP are you using?  You should be able to simply drag and drop a button from the palette onto the screen and specify its action.

The sample on Debugging a Hybrid App may also be useful to determine why you current code is not working.

Debugging a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-150957

Regards,

Dan van Leeuwen

tahir_z
Contributor
0 Kudos

Hi Miquéias,

Once create a menuitem and assigned onlineRequest to it. After that you can add menuItemCallback.. to Aftermenuitemclick event as below;

function customAfterMenuItemClick(screen, menuItem) {

     if (screen == "<screenKey>" && menuItem == "<menuitemkey>") {

        menuItemCallback...

     }

}

Regards

Tahir