6/26/2023 0 Comments Lightning app builder properties![]() The list is restricted to only those values that are valid therefore making it easier to use and less likely to cause an unexpected error. So now when the timeline component is on a page I can dynamically change the sObject and record on which the data is based. The final step was to add the dynamic property to the Lightning Web Component and test it. ![]() global with sharing class TimelineParentPicklist extends VisualEditor.DynamicPickList Step 6 - Add property to Lightning Web Component Salesforce provides an abstract class - DynamicPicklist - that can be extended to provide the basic capabilities for the dynamic picklist. So let’s look at how I approached the development to meet the above requirements. Fields shown need to be only those accessible to the current user to adhere to security rules.Fields shown must be the label and not the API name to improve usability. ![]() Must show all fields that represent a relationship to Account, Contact, Lead, Case or Opportunity only.So for the Contact lightning page the value should be ‘Use This Contact’ Must have ‘Use This ’ as an option in the dropdown list where is dynamic based on the current Lightning Page the timeline is dragged onto.In order to recreate the look and feel of the standard component above I first wrote down my requirements. The developer can provide a more user friendly, reusable component as a result. ![]() Both methods utilize Lightning App Builder, which. What I needed was the ability to dynamically set the drop down values at run time.ĭynamic properties allow developers to expose picklist values to a Lightning Web Component where the values are provided by an Apex class. One method is to edit an existing Home page and the other is to create a new page using a Home page template. I had already added static properties with static picklist options. A standard component showing the ability to customise behaviour with dynamic properties ![]()
0 Comments
Leave a Reply. |