Display Custom Content for a Child Object

You can display a custom drawer content for a child object using a smart action in your application.

For this, you need to:

  1. Create a smart action in your application
  2. Configure the drawer content in Visual Builder Studio

Create a smart action in your application

Create a smart action of type Display custom content. For example:

  • Name: Details
  • Object: Location, a custom child object of Account
  • Action Type: Display Custom Content
  • Action ID: The generated action ID for the smart action

Make a note of the generated Action ID, which will be used in the callback logic.

Configure the drawer content in Visual Builder Studio

  1. Open your container page in Visual Builder Studio.
  2. Create a section called Details for your drawer container.
  3. Configure the Details template to display the required custom content. For example, Record Name and Record ID.
  4. In JSON, make sure that the expression is correct for drawerContainerLayout rule.
  5. In the Action Chains tab, for the onBeforeInvokeSmartActionCallbackChain class:
  • Check the condition for the smart action
  • Make sure that the value of the UserActionName is the Action ID of the smart action you created
  • Return the correct template ID for the drawer content

You can now preview you changes in the application.

Here is a sample code: if (action?.UserActionName === 'CUST-Details-accounts.OrganizationDEO_LocationCollection_c') { return done({ continue: true, actionConfig: { drawerProperties: { drawerTemplateId: 'detailsTemplate', drawerSize: 'md' } } }); }