Skip to Content
0

C4C SDK - Add Member to TargetGroup

Jul 07, 2017 at 09:34 AM

87

avatar image
Former Member

Hello Experts,

I have a requirement as below... Kindly let me know if you have any other way of handling this.

Approach 1:

By standard the list of TG’s which has this Contact added will be displayed in the list view.
The above OWL is from an EC. So the approach I took was to hide that EC, and include a Custom EC as TARGETGROUPS TAB in Contact TI. I tried to add the advanced list pane - here and got this issue. The query is to pass the ContactUUID and fetch the relative target groups.

The problem is when i activate with ExecuteDefaultSet - query. The binding with lower association doesn't work. I get a dump when i do this way. To prove this, I tried to map the query to the TargetGroupd ID, and I found it works fine, I can't use SADL too, because this is custom EC

Approach 2:

Due to the above issue I tried to add an EC to the Contact header, On click of it - opens a Modal Dialog, where the Target group is selected using OVS. Now I could get this Target Group in the custom Action of my custom BO. But i couldn't find a handle in the targetGroup.BO, where I could create or add a memeber. There is no such method.

Approach 3:

Now, with the failure in Approach 2, I'm trying to use ManageTargetGroupIn - an SAP Inbound Webservice . I have not got any reference of how a C4C webservice consumed in SDK, However, I assume I can use it like External Webservice Integration.

Can some one help me on this topic..

requirement.jpg (73.6 kB)
list.jpg (100.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Jul 10, 2017 at 11:20 AM
0

Hello Gayathri ,

from my point of view, it is totally legal to use an SAP synchronized Webservice Internally. I have also solved this way: D
There was no other way. - In my opinion

To Do this, you need to download the Inbound Service and add it in the solution as external web service. After that you need to assign the external web service to an CA, and set up the path of the CA. <Thats it...

a little hint:
You can also create an OWL with the SADL and set this OWL in the EC:D

Best Regards

Said

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Said,

Thanks for your response. I have created them, I have struggle in the absl part.

Can you please share me the absl code?

Thanks

Gayathri.

0
Former Member

Hello Gayathri,

you just need fill out the webservice...

var requestObject : ManageTargetGroups.MaintainBundle.Request; 

var TargetGroupObject :ManageTargetGroups.MaintainBundle.Request.TargetGroupBundleMaintainRequest_sync.TargetGroup;
TargetGroupObject.ID= <<Id of Targetgroup>>;
TargetGroupObject.actionCode = "04";

var currentMember : ManageTargetGroups.MaintainBundle.Request.TargetGroupBundleMaintainRequest_sync.TargetGroup.Member;
 
currentMember.CustomerUUID.content = <<UUID of Customer>>
 
currentMember.actionCode = "01";
 
currentMember.ContactPersonUUID.content = << UUID of Contact >>
TargetGroupObject.Member.Add(currentMember);

requestObject.TargetGroupBundleMaintainRequest_sync.TargetGroup.Add(TargetGroupObject); 

var response = ManageTargetGroups.MaintainBundle(requestObject, "", comserviceForInbound); 

Best Regards

Said

0
Former Member
Former Member

Thanks a Lot Said..

0
Former Member
Former Member

Hello Said,

I need one more support. The code that you shared was very straight forward. However, in my changes I notice that

1. Target group is a list and hence i have to mention GetFirst

2. Also Im unable to map Member..

Any thoughts why?

0
Former Member
Former Member

I tried to check this using the WSDL and I get this error.

0
Former Member

Hallo Gayathri,

1. In what Event you are calling the targetgroup?

0