LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

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

Open cdevelin opened this issue 1 year ago • 1 comments

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')]

cdevelin avatar Aug 01 '24 20:08 cdevelin

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.

Garywoo avatar Aug 28 '24 14:08 Garywoo