0

I am facing an unexpected issue. And unable to resolve this. Any inputs are appreciated.

We are using Enhance Lightning Grid App provided by Salesforce Labs.

There are custom metadata that this app use with API NAME sortablegrid__SDGDefaults__mdt

Now, This metadata contains a format for designing a row for a record in Table.

There are buttons inside the row, which are responsible for fire events. Error is in button which are firing custom Application events.

The Syntax for which is This.

  "version":1, 
  "sdg":{ 
   "attributes":{ 
   "type":"sortablegrid__SDG__c" 
    }, 
     "Name":"Shortlist Student", 
     "sortablegrid__SDG_Tag__c":"Shortlist Contract", 
     "sortablegrid__Is_Valid__c":true, 
     "sortablegrid__Parent_Field_Name__c":"Job__c", 
     "sortablegrid__sObjectName__c":"Job_Application__c", 
     "sortablegrid__All_Rows__c":false, 
     "Id":null, 
     "sortablegrid__SDGFields__r":{ 
     "totalSize":7, 
     "done":true,  
     "records":[ 
                 { 
           "attributes":{ 
           "type":"sortablegrid__SDG_Field__c" 
           }, 

     "sortablegrid__SDG_Actions__r":{ 
     "totalSize":2, 
     "done":true, 
           "records":[ 
                      {  
                 "attributes":{ 
                 "type":"sortablegrid__SDG_Action__c" 
                 }, 
     "sortablegrid__SDG__c":null, 
     "Id":null, 
     "Name":"Add Student", 
     "sortablegrid__Action_Order__c":1, 
     "sortablegrid__Action_Type__c":"List Button", 
     "**sortablegrid__Event__c":"e.force:createRecord",** 
     "sortablegrid__Event_Payload__c":"{\"entityApiName\": 
    \"Job_Application__c\", \"RecordTypeId\":\"0120Y000000aB7dQAE\", 
    \"defaultFieldValues\": { \"Job__c\" : \"#parentrecordId#\"} }", 
      "sortablegrid__Requires_Createable__c":true, 
       "sortablegrid__Requires_Deletable__c":false, 
        "sortablegrid__Requires_Editable__c":false, 
        "sortablegrid__Icon__c":"utility:new" 
     }, 
     {  
         "attributes":{ 
               "type":"sortablegrid__SDG_Action__c" 
                      }, 
        "sortablegrid__SDG__c":null, 
        "Id":null, 
        "Name":"Fire Custom Event", 
        "sortablegrid__Action_Order__c":3, 
        **"sortablegrid__Action_Type__c":"Row Button", 
        "sortablegrid__Event__c":"e.c:customEvent.evt",** 
        "sortablegrid__Event_Payload__c":"{\"ApplicationId\" : \"#id#\"}", 
        "sortablegrid__Requires_Createable__c":false, 
        "sortablegrid__Requires_Deletable__c":false, 
        "sortablegrid__Requires_Editable__c":true, 
        "sortablegrid__Icon__c":"utility:share" 
        } 
        ] 
        } 
        } 
        }    

In the above piece of code. If you see sortablegrid__Action_Type__c. There are 2 different Event that we are using.

In 1 we are using.

         sortablegrid__Event__c":"e.force:createRecord",** 
         "sortablegrid__Event_Payload__c":"{\"entityApiName\": 
         \"Job_Application__c\", \"RecordTypeId\":\"0120Y000000aB7dQAE\",

The first one is working perfectly fine in all orgs.

The 2nd one.

            sortablegrid__Event__c":"e.c:customEvent.evt",
           "sortablegrid__Event_Payload__c":"{\"ApplicationId\" 

Now this one is all of sudden throwing an Error after Summer 19 in the sandbox Error: Invalid event name - cannot identify the event

Note: The Component without a body to listen to this event is added to flexi page.

We are unable to fire any custom Application event using this approach all of sudden. These things are working fine in production which is still not In the latest release.

Any Ideas any Thoughts?

1

we had the same problem starting with the Summer '19 release in our Sandbox. After discussing it with Salesforce Support we added the access="global" attribute to the event, then it worked again.

  • Thanks, Nobert. We did the same thing. I traced down its code as it is available. And was able to understand what is causing this thing. – Vivek Makkar Jun 12 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.