Using Custom Fields

You can create Custom Fields with webMethods Integration. Using the Custom Field functions, you add new custom data fields. A custom data field can be a String, Integer, Float, Double, Long, Boolean, Short, Document, or an Object.

About this task

While you are adding custom data fields as the child of another custom field, the field must be unique among all the children of the parent field. The newly added custom field is then added to the existing data fields list. This list is sent to the API when you create a custom operation and gets reflected in the input/output signature along with other selected fields.

Now that you know what custom fields are all about, you can now add custom data fields. To do so, complete the following steps:

Procedure

  1. Add the Salesforce CRM connector to the canvas.
  2. Configure your Salesforce CRM action by double-clicking the Salesforce icon. From here, you can create a new custom action, or access an existing custom action.

    For demo purposes, create a new custom action query.

  3. Click + . The Add Custom Action screen appears.

    From here, you can create a new account, or access an existing account. Create a new account create.

  4. In the Add Custom Action configuration form that appears, provide the following details:
    • Select Authentication type: Select an authentication type, for example, Credentials.

    • Authorize AccountCreate: Select an account to run the selected action.

    • Name: Provide a name for the account, for example, create.

    • Description: Enter the description of the account.

  5. Click Next and select an action to be performed, for example, create.
  6. Click Next and select the business object to be associated with the action create. Business Objects and Interactions appear only for certain applications and actions.
  7. Click Next. To add the new custom data fields FirstName and LastName to use for the business object Contact under Account, click Add Data Field.
  8. In the Add Data Field window, add the new custom data fields Firstname and Lastname. Select the Required option to indicate whether the field is a required field.

    Provide the name and type of the data field to define the structure and content of the data fields. In the preceding example, "ens: Contacts" is added as the data field and the data type as "document" that has a parent hierarchy.

  9. Click Next. Similarly provide "ens:FirstName" and "ens:LastName" fields and data type as "string" for a child hierarchy.
  10. Click Next. Confirm the action, and then click Done.

    You are redirected to the main screen. Click Next. You are redirected to the action configuration window.

  11. In the select field, query the custom data field FirstName and LastName for the business object Contact under Account.
  12. Click Next. You are redirected to the Test this action window where you see the custom data field FirstName and LastName for the business object Contact under Account.
  13. Click TEST. If you have configured the action correctly, you see in the output data the added custom data field FirstName and LastName. It gives you an idea of how your action works when used in a workflow and which keys are returned in the output of the trigger. The output data is then used to configure the rest of the workflow.

Results

The custom field is successfully set up. Now, click Save to save the workflow. You can now use this account in any workflow that is created under the same project.