Skip to Content
0

Create custom BO on button click

Jul 11, 2017 at 08:11 AM

42

avatar image

Hi Gurus,

Is it possible to create custom BO entry in database on button click?

Eg. I have BO_1 and under some conditions I would like to create BO_2 entry in database after clicking button on BO_1

Thanks,

Zoran

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Senthil Murugan Jul 11, 2017 at 01:25 PM
0

Hi Zoran

Yes, you can, create an action in BO_1.

In the script file of that action,

if(condition)

BO_2.Create();

Assign the action to an event handler and link the event handler to the button and don't forget to check the safe after execution.

Regards,

Senthil

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi,

Thanks!

I see :-) both BO has to be inside same solution!

Why I can't create custom BO from other solution on the same tenant?!?

br,

Zoran

0

Hi, you can refer the below link for why you can't create instance in other solution of the same tenant.

https://blogs.sap.com/2015/10/15/multiple-solutions-in-one-tenant/

Even so, there is a workaround possible

  • Create a webservice for BO_2 with "create" option.
  • Create an action in BO_1.
  • In the script file of that action,
  • if(condition)
  • Call/Execute the WebService
  • Assign the action to an event handler and link the event handler to the button and don't forget to check the safe after execution.

Regards,

Senthil

1
Zoran Galijanic Jul 12, 2017 at 08:09 AM
0

Thank for clarification!

br,

Zoran

Share
10 |10000 characters needed characters left characters exceeded