Skip to Content

Link to Part 2.

 

 

Last part is now to implement the call to the service.

 

 

The idea is to call the web service at the event ‘Before Save’. Here we will call the web service with the data entered. Wait for the return of the id’s from the IS-U system and then save this in our Business Object.

 

 

In the SDK go to our Business Object, right click and select ‘Create Script Files’.

 

 

/wp-content/uploads/2016/09/2016_09_06_18_57_16_1030783.png

 

 

Then we get a list of events. The event we will use is the ‘BeforeSave’ event. Click ‘OK’.

 

 

/wp-content/uploads/2016/09/2016_09_06_18_59_07_1030784.png

 

 

This will open the editor, and here is the code I entered.

 

 

/wp-content/uploads/2016/09/2016_09_08_11_53_10_1032071.png

 

 

 

(1) – creating 2 variables, one for the request we will send and one for the reponse. The CO_WEBSERVICE_2 is the one just created, and using auto complishion (CTRL + SPACE BAR) it will automatically suggest the interface and then also the request/response.

 

(2) – adding the fields entered on the view to the request variable.

 

(3) – calling the service and setting the respose variable = the result. OBS: The ‘CO_PR_WEBSERVICE_2’ is the name of the communication Arrangement we created in an earlier step.

 

(4) – adding the response from the call to our BO.

 

(5) – writing a message to the user, with the ID’s of the objects just created in IS-U.

 

Now save and activate this.

 

 

—-

 

Let’s test this with a user in C4C.

 

First we will assign the Workcenter that is automatically available in C4C based on the Business Object we created for this implementation.

 

/wp-content/uploads/2016/09/2016_09_08_12_04_55_1032072.png

 

 

 

Logging on with the user where this is assigned to, we have the new work center assigned.

 

 

/wp-content/uploads/2016/09/2016_09_08_12_09_22_1032078.png

 

When we open this we have an empty list – then click on ‘New’.

 

 

/wp-content/uploads/2016/09/2016_09_08_12_12_11_1032079.png

 

 

The create view opens, and we can enter some sample data.

/wp-content/uploads/2016/09/2016_09_08_12_13_53_1032095.png

 

Then click ‘Save’.

 

At the bottom of the screen we see the sucess message:

 

/wp-content/uploads/2016/09/2016_09_08_12_14_22_1032096.png

 

 

SO WE MADE IT ALL THE WAY —  🙂   😆   😎

 

 

As stated in the beginning, this is not pretty but it is ALL the steps from IS-U, PI to C4C.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply