0

I have a Managed Base Package BASE and multiple Extension Packages EXT1...EXTn. The Base Package contains a CustomObject__c and a Flexipage to edit the fields also packaged in BASE. The Extension packages model different flavours or types (Type__c field but NOT a native Salesforce RecordType) of the CustomObject__c by packaging additional fields and logic.

I am now looking for a way to have Extension Packages enhance the BASE Flexipage for CustomObject__c using Flow Screens (single Flows with multiple wizard-like screens).

When a user creates a CustomObject of Type__c = EXT1 in the BASE Flexipage there should be a way to eighter embed (LWC component that dynamically embeds) OR load from a QuickAction (packaged in BASE) which loads in a modal the relevant Flow from the EXT1 package.

enter image description here

If the user creates a CustomObject__c with Type__c = EXT2 the Flow of EXT2 should be used to edit EXT2 fields.

How do I best start tackling that and what is your answers to:

  1. Can I directly embed via LWC that renders a multiscreen Flow Screen wizard in the Flexipage depending on the CustomObject__c Type__c?
  2. or should I use QuickActions renders a modal?
  3. Is both not a good solution and there is a better way?
2
  • 1
    Does it have to bind to the Type__c field? I ask because packaged flows can now be "overridden" which means your base package could contain the object and base flow and however that flow is launched (embedded in flexipage, flow action, etc), then your extension package could simply override the base flow with its own flow. help.salesforce.com/apex/…
    – Jeff Kranz
    Commented Oct 23, 2021 at 1:21
  • Not a 100% sure what you mean with bind but in my case extension packages are not really optional extensions. The BASE functionality only works with 1 or many extensions installed that implement the specifics of their types. So overriding is interesting (please put it into your answer if you create one) but not a hard requirement. Commented Oct 23, 2021 at 9:40

2 Answers 2

3

I ended up with a solution that is composed of:

  1. A Custom Metadata Type in Core that allows mapping Record Types to Flows
  2. A LWC Component in Core which loads flow depending on Type and CMDT records
  3. A single Flexipage in Core with a Tab that embeds this LWC
  4. QuickActions in Core which also uses the same LWC.
  5. A Flow in each Extension providing UI for the specific Type
  6. A CMDT record in the Extensions for each Type

enter image description here

0

How about this:

Aura components can be instantiated dynamically with $A.createComponent('nameOfComponent') so the component name can be delivered from the package resp. custom metadata around it. So basically you can instantiate specific components from each package within the same flexipage from the base package. As Aura components can also launch Flows with <lightning:flow> this should be satisfying your requirement if I got it correctly.

btw: I heard a rumor whereas ISVs will be allowed soon to instantiate Lightning Web Components dynamically which is not possible by now, maybe you can check the partner portal for this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .