How to get Selected Entities in Salesforce.com Change Data Capture using force-partner-api-55.2.jar?

50 Views Asked by At

I tried getting Selected Entities from Change Data Capture in Set Up to display on the client app. I use force-partner-api-55.2.0.jar and then call describeGlobal() in ParnerConnection.java.

    DescribeGlobalResult dgr = getPartnerConnection().describeGlobal(); 
    DescribeGlobalSObjectResult[] objects = dgr.getSobjects();
    List<SObjectCache> selectedEntities = Arrays.stream(objects)
                    .filter(c -> "ChangeEvent".equals(c.getAssociateEntityType()))
                    .collect(Collectors.toList())

It returns all Available Entities in the Change Data Capture configuration form while I expect to get Selected Entities only.

Then, I looked deeper into the DescribeGlobalSObjectResult to find out what properties can be used to filter and get Selected Entities, but I got nothing. There are no properties to target that info/setting.

captured image at debug time

enter image description here

enter image description here

So, how could I get Selected Entities from the Change Data Capture configuration?

1

There are 1 best solutions below

0
eyescream On

Read up about PlatformEventChannel and PlatformEventChannelMember, there are some examples for AccountChangeEvent, ContactChangeEvent and package.xml examples at the bottom of the page. You should be able to describe them and/or run a Tooling API query on "member".