+ Start a Discussion
Richard - HowardRichard - Howard 

How do I corrrect the Payload syntax or configuration of a list action in an Enhanced Lightning Data Grid?

I am in the process of implementing the Enhanced Lightnig Data Grid app and in particular a list action on a Sortable Data Grid that already shows on the User Profile page for all users in my org.

This displays a list of records of the Taxonomy_Assignment__c object on a users profile page. The use case is to track areas of technical expertise within our user base and give users the ability to self manage their own areas of expertise.

App Listing: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EVK8iUAH (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EVK8iUAH" target="_blank)

The Sortable Data Grid is showing correctly as expected and my Add Area of Specialism Action link . button  appears in the SDG drop down.

However, when I click the action, I get the following component error message:

"Uncaught Action failed: sortablegrid:sdg$controller$RaiseListEventMenu [Cannot read property 'get' of undefined]"

Screenshot of lightning component error message on SDG list action failure

My Event Payload is currently set as follows, however I am not a developer and have no idea whether this is correct or not:

{"entityApiName":"Taxonomy_Assignment__c", "defaultFieldValues" : {"User__c":"#parentrecordId#"} , "defaultFieldValues" : {"RecordTypeId":"012D0000000NekmIAC"}}

If anyone has any advice as to how I may fix this, I would be most grateful.


SDG Configuration:
User-added image

SDG Action Configuration:
User-added image


Full error details are pasted below for reference:

Message:

Uncaught Action failed: sortablegrid:sdg$controller$RaiseListEventMenu [Cannot read property 'get' of undefined]

File Name:  
https://accelerator.lightning.force.com/auraFW/javascript/hhh5Vv8CJJLjCXfK6oE_Iw/aura_prod.js

Stack Trace:

Object.get()@https://accelerator.lightning.force.com/auraFW/javascript/hhh5Vv8CJJLjCXfK6oE_Iw/aura_prod.js:814:263
$.get()@https://accelerator.lightning.force.com/auraFW/javascript/hhh5Vv8CJJLjCXfK6oE_Iw/aura_prod.js:828:128
Object.value [as get]()@https://accelerator.lightning.force.com/auraFW/javascript/hhh5Vv8CJJLjCXfK6oE_Iw/aura_prod.js:24:25153
Object.FireEvent()@https://accelerator.lightning.force.com/lightning/r/User/005D0000008tWSKIA2/components/sortablegrid/sdg.js:660:33
RaiseListEventMenu()@https://accelerator.lightning.force.com/lightning/r/User/005D0000008tWSKIA2/components/sortablegrid/sdg.js:199:16
Object.selectItem()@https://accelerator.lightning.force.com/components/lightning/buttonMenu.js:16:16
Object.handleClickOnMenuItem()@https://accelerator.lightning.force.com/components/lightning/buttonMenu.js:17:143
HTMLDivElement.eval()@https://accelerator.lightning.force.com/components/lightning/buttonMenu.js:12:275
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Richard,

Greetings to you!

I'm afraid I wasn't able to find much regarding this exact error. Here is a related discussion which hopefully may be able to guide you somehow:

https://developer.salesforce.com/forums/?id=9060G000000MRR3QAO

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Richard - HowardRichard - Howard
Hi Khan, Unfortunately that thread does not help. Thanks for looking anyway. Richard
Jake MostowikJake Mostowik
Hi Richard,

Can you please try changing the 'Event' field in the action so it reads "e.force:createRecord" opposed to "c.force:createRecord" and let me know how you go?

Thanks,
Jake Mostowik
Bob Hatcher 13Bob Hatcher 13
Jake is right - the documentation for this app is incorrect. It should be e.force:createRecord.