pegros / PEG_LIST

Set of configurable/actionable LWC list components for Salesforce Lightning UX
MIT License
20 stars 9 forks source link

[bug] SfPegActionBar - Data record value breaks JSON format #65

Closed ismailsalam closed 5 months ago

ismailsalam commented 6 months ago

Describe the bug When we try to merge variable which contains a specific charachter double quotation ", its breakes the format JSON of file configName, then the component fail and don't display the bottons. We think this is true for all others Peg components

To Reproduce Steps to reproduce the behavior:

  1. Go to a custom metadataType of sfpegActionBar
  2. use variable like {{{RCD.Name}}}
  3. if the value of RCD.Name contains a double quotation charachter like 'ADM" Paris'
  4. the component Fail, and don't display the bottons

Expected behavior List of bottons displayed --> at the merging of data, we need to escape the double quote.

pegros commented 6 months ago

Thank you @ismailsalam for reaching out. Did you give a try at the ESCAPE(((...))) feature described in the sfpegMergeUtl documentation ? I indeed have no issue to display values containing double quotes such as in the following example:

{
  "name": "toast",
  "label": "Toast for ESCAPE((({{{RCD.Name}}})))",
  "variant": "base",
  "action": {
    "type": "toast",
    "params": { "title": "Toast for ESCAPE((({{{RCD.Name}}})))", "variant": "success"}
  }
}
pegros commented 6 months ago

@ismailsalam Did you have the chance to test my recommendation ? Is this still a valid bug ?

pegros commented 5 months ago

No change done.

ismailsalam commented 5 months ago

Sorry for the late response, yes I tested your recommendation, and it works fine. THANKS