I am trying to use connectapi to connect to cdp entities like below

  public static ConnectApi.CdpQueryMetadataOutput cdpM {get;set;}
    public static ConnectApi.CdpQueryMetadataOutput test1() {   
        cdpM = ConnectApi.CdpQueryMetadataOutput.getProfileMetadata('UnifiedIndividual__dlm');
        return cdpM;

Its throwing me compilation error

Method does not exist or incorrect signature: void getProfileMetadata(String) from the type ConnectApi.CdpQueryMetadataOutput

Any idea how to use connectApi methods.

1 Answer 1


You're trying to access a method on the output class. It has no methods.


cdpM = ConnectAPI.CdpQuery.getProfileMetadata('UnifiedIndividual__dlm');

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .