• Biao Tian
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
Hi All,

I have a scenario where i need to override Standard 'New' button on a custom object. On click of the button, a Modal should be displayed. This modal would be a form which will ask user to input some data and then Save the result on click of Save Button.

I already overrode the 'New' button with Lightning Component but instead of pop up, a page is displayed. 

Any ideas?

I'm trying to get Google Tag Manager working with a Lightning Community. This involves getting a script and iframe into the site as per https://developers.google.com/tag-manager/quickstart

Script can't be put into the community head markup or branding css, so I created 2 Lightning components as follows:

Header component
<aura:component implements="forceCommunity:availableForAllPageTypes">
    <ltng:require scripts="{!$Resource.googletagmanager}"/>

Body component
<aura:component implements="forceCommunity:availableForAllPageTypes">
    <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
    height="0" width="0" style="display:none;visibility:hidden"></iframe>

The header component gives me an error as follows:

Uncaught Error: SecureElement does not allow access to async throws at https://myorg--livepreview.instance.force.com/mycommunity/s/sfsites/auraFW/javascript/egTJsAb7_Esngaq3zUvPDw/aura_prod.js:8:15

It looks like Lightning Components doesn't like the async attribute in the GTM script? If so, can I somehow get them to be friends? I can remove async from the script but I don't know how this will affect GTM. Anyone needed to do this before?