ballerina-platform / ballerina-dev-tools

Ballerina Developer Tooling
http://ballerina.io
Apache License 2.0
114 stars 42 forks source link

[Task]: Clarification Needed: Incorrect Listener Creation in `ballerinax/trigger.salesforce` Documentation #308

Open PasinduYeshan opened 10 months ago

PasinduYeshan commented 10 months ago

Description

The current documentation in ballerinax/trigger.salesforce suggests the following method for creating a listener:

sfdc:ListenerConfig configuration = {
    username: "USER_NAME",
    password: "PASSWORD" + "SECURITY_TOKEN",
    channelName: "CHANNEL_NAME"
};
listener Listener sfdc:Listener = new (configuration);

However, it appears that there might be an error in the code snippet. The correct way to create a listener should be:

sfdc:ListenerConfig configuration = {
    username: "USER_NAME",
    password: "PASSWORD" + "SECURITY_TOKEN",
    channelName: "CHANNEL_NAME"
};

listener sfdc:Listener sfEventListener = new (configuration);

Please review and confirm if the corrected code is accurate.

Further, certain prerequisites required for this feature might not be available in the free version of Salesforce. However, these prerequisites are accessible in the developer edition. To enhance the documentation and provide users with accurate information, it's recommended to include a note about the availability of these prerequisites in the developer edition. This will guide users to use the appropriate Salesforce edition for enabling the mentioned feature.

Describe your task(s)

Related area

-> API Docs

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response