function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vamsi krishna 106vamsi krishna 106 

We can’t execute the API because the parent record isn’t selected.

var recordId = cmp.get("v.recordId");
       var Fields = { ToAddress: {value: "to@to.com"}, 
                     ParentId	: {value: recordId}, 
                     HTMLBody: {value: "the text body", insertType: "cursor"} }
        var args = {actionName :"Case.Send_Email"};
        actionAPI.selectAction(args).then(function(result){
            console.log('Available Fields are ', JSON.stringify(result));
            //actionAPI.invokeAction(args);

        }).catch(function(e){
            if(e.errors){
                console.log('Action Field Log Errors are ',e.errors);
                console.error('Full error is ', JSON.stringify(e));
            }

try to using the "quickActionAPI" and gettting the 

below error "We can’t execute the API because the parent record isn’t selected."
Calling the Quickaction from lightning component and it's not working. please let me if i am doing anything wrong..

Thanks in advance.Full Screen
Khan AnasKhan Anas (Salesforce Developers) 

Hi Vamsi,

Greetings to you!


Please refer to the below links with a similar discussion which might help you further with the above issue.

https://salesforce.stackexchange.com/questions/221217/how-to-fire-global-action-from-a-lightning-component

https://salesforce.stackexchange.com/questions/253383/call-custom-object-quick-action-from-lightning-component

https://developer.salesforce.com/docs/atlas.en-us.218.0.case_feed_dev.meta/case_feed_dev/quickaction_api_considerations.htm

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

Kumar BittuKumar Bittu
Hi,

I am also facing the same error message "We can’t execute the API because the parent record isn’t selected."

Also not able to understand about - what needs to be add to pagelayout or published. As I have custom component button on component page that is avaialbe on lightning record page. 
Can somebody plz explain the proper way or solution for it.
 
Renzo VargasRenzo Vargas
The line 08 should not be commented and check the Page Layout Assignment
Marcio_FritschMarcio_Fritsch
I am facing same issue. none of links provided above worked well to me.
Kevin 13Kevin 13
@Marcio_Fritsch were you able to find a solution to the problem? Thanks!