alexed1 / LightningFlowComponents

A collection of unofficial Flow extensions that can be used to enhance Salesforce Flow and Orchestrator.
http://unofficialsf.com
Other
590 stars 578 forks source link

*showToast* - _(FlowActionCall)_ - If message parameter is not supplied, flow crashes with [Cannot read properties of undefined (reading 'toLowerCase')] #1570

Open cdevelin opened 3 months ago

cdevelin commented 3 months ago

Steps to reproduce the behavior:

  1. Install Show Toast package v2.0
  2. Add Show Toast action to a flow, set the input value parameters on the flow action: [Dismissal mode: pester], [Duration: 5], [Icon: do not activate], [Message: do not activate], [Title: 'Test]', [Type: info], [URL Label: do not activate], [URL Link: do not activate]
  3. Activate flow and add to a lightning page
  4. Run flow on lightning page
  5. See error

Expected behaviour

Flow should show a simple toast action with a title, but no detailed message. e.g. 'Test'

Actual behaviour

Flow crashes, with the log error:

Error element Info_Toast (FlowActionCall). Action failed: c:showToast$controller$invoke [Cannot read properties of undefined (reading 'toLowerCase')]

Garywoo commented 2 months ago

While I agree with the logic that every toast should have a title, if you look at the documentation, it states that the message parameter is required, and the title parameter is optional. This is a little confusing, I know.

For a single line of text in the toast, the standard usage is to only supply a message value, and not include a title parameter. The message value is then displayed in the large text size inside the toast.