Create Asset Using Custom Action On Account Record page

To create Asset using custom action on Account Record page in Lightning Component, you must have created the Lightning component that needs to be invoked. Check my blog post on Create Account-Asset Record-specific action in Lightning Component.

Create an Object-Specific Action

  1. From SetUp, Click on the Object Manager, select Account .
  2. From the Account object management settings, go to Buttons, Links, and Actions and click New Action.
  3. For Action Type, select the Lightning Component you created.
  4. Immediately, a Lightning Component field comes up where you need to select the component to use. For this post, I have created AccountAssetAction.cmp
    acountasset
  5. For Standard Label Type, select None
  6. Note: If you select any of the standard label, there will be error “Error: Field cannot be set for type Lightning Component” as seen below.
    Lightningcomponent
  7. For Label choose a name that best fit your use case e.g. New Account Asset
  8. For Name, there can be underscore but no space. It follows Salesforce API name e.g. New_Account_Asset
  9. Add Description if desired
  10. Click Save
  11. Again, from the Account management setting, go to Page layout
  12. Click Mobile and Lightning Component on the left column and drag New Account Asset to Mobile and Lightning Component panel
  13. Rearrange the actions by placing this new one on the first row
  14. Click the Related List and drag Asset object below Contact so that it is visible on Account detail page and
  15. Click Save
  16. On Sales App, and click on Account.
  17. Click on any Account record. e.g. Edge Communications
  18. On the top right-hand, click on the New Account Asset button created new account
  19. Fill in the fields
  20. Click Save button

Reference

Lightning Aura Components Developer Guide

This Post Has One Comment

Comments are closed.