• kaushal sharma 24
  • -4 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 13


In a Community Page, I have a LWC with an handler for message events (I use it to intercept message from an iframe).
The problem is that the handler intercepts an infinite number of message events.

For simplicity, we can consider the following LWC:

<div>-- COMPONENT TEST --</div>
<div>-- EVENTS: {counter} --</div>


import {LightningElement, track, api, wire} from 'lwc';

export default class Test extends LightningElement {

    counter = 0;

    checkEvent(event) {
        console.log('--> Event: ', event.type);

    checkEventBind = this.checkEvent.bind(this);

    connectedCallback() {
        console.log('--> connectedCallback');
        if (window.addEventListener) {
            window.addEventListener("message", this.checkEventBind, true);
        } else {
            window.attachEvent("onmessage", this.checkEventBind);

    disconnectedCallback() {
        window.removeEventListener('message', this.checkEventBind, true);


<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

The error occurs when the LWC is on a Community Page with a Flexible Layout. Clicking anywhere on the page generates an infinite number of message events.

The problem seems related to the Flexible Layout because it doesn’t occur if the LWC is on a Community Page with a full-width column layout.

Another example:

  1. I add the LWC on a Community Page with a Flexible Layout and on a Community Page with a full-width column layout
  2. I first open the Page with the Flexible Layout and then the Page with a full-width column layout
  3. Now, clicking anywhere on the Page with the full-width column layout, starts the generation of an infinite number of message events.

How can I solve the problem?
Do I have to avoid Flexible Layout in my Community?

I need to create a left arrow back button and when someone clicks this back button ,it should perform some action. Is there any out of the box functionality of lightning button with left arrow key. Please help me .  Refer the image with the first card.  <        Manage ConsentUser-added image

I created a BatchApexErrorEvent Trigger and it is working as expected when the Batch is throwing CPU limit Exception. I am not able to Cover the Trigger with Test Class code. I tried using Test.getEventBus().deliver(); but the Trigger is not covered. 

Please help if anyone has written a Test Class to cover the trigger on BatchApexErrorEvent object. 

Can anyone look at this and tell me why this is NOT prompting the validation rule to fire?
The rule says, IF first field = x and the second field = NULL, then fire rule.
AND(ISPICKVAL(Sales_Status__c, "Startup (pre-startup meeting)"),
Startup_Meeting_Date__c = NULL)

Error Message:
Challenge Not yet complete... here's what's wrong: 
The AccountTab Visualforce page does not include one or both of the following: the apex:slds tag in the page, or the slds-table value in the table.

Hello all. I am working on the new superbadge and getting stuck on Challenge 3 . I have tried several solutions but cannot get the data to display in table format. Here is my code below, my main issue is where to place the table class in realtion to the pageBlockTable.

<apex:page standardStylesheets="false" standardController="Account" recordSetVar="accounts" tabStyle="account" applyBodyTag="false">
    <apex:slds >
        <div class="slds-scope">
                    <table class="slds-table"> 
                    <apex:pageBlockTable  value="{!accounts}" var="a">
                        <apex:column headerValue="{!$ObjectType.Account.Fields.Name.Label}">
                            <apex:outputLink value="{!URLFOR($Action.Account.View, a.id)}">{!a.name}</apex:outputLink>

Hi, I'm running into an issue with getting an access token using a connected app with grant_type = password.  Here is my curl script:

curl https://test.salesforce.com/services/oauth2/token -H "Content-Type:application/x-www-form-urlencoded" -d "grant_type=password" -d "client_id=<my client_id>" -d "client_secret=<my client_secret>" -d "username=<myusername@domain.com>" -d "<my password+secret>"

I'm getting an invalid_grant error  "Authentication failure" 

Hello Helper


I want to export   from an org a package  containing  custom objects,  Custom fields , classes,  custom buttons......


I created a package.xml  file where I included  the Metadata  types  I want to export


I can not  specify  Custom button Metadata  type

Looking into the salesforce docs it seems to me that is is  considered as weblink


I tried  something like  below







but it does not work


any suggestion?



Thanks in advance






  • September 22, 2013
  • Like
  • 1