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
Deepu Gupta 29Deepu Gupta 29 

How to call Standard Page layout of custom object from lightning button

Hi All,

I am new to the lightning.
I have requirement where I have created one Search Lightning page which will serach based on some input fields and giving me output in datatable.

Now,I have added one button in the last column of the datatable and this button is there on each record of datatable,now on the click of that button,I want to navigate it to the standard Opportunity page layout and setting this output row's result into Opportunity layout fields.
supose I have recieved Id,name,address as a result and i want to set this address into opportunity's address field.how can i achieve this?Please suggest.

Thanks in Advance !!
Raj VakatiRaj Vakati
I dnt think so you can able to direcly call the Page layout .. insted you need to navigate the record whihc contains the page layout .. 

You can do it by using 
 
var sObjectEvent = $A.get("e.force:navigateToSObject");
    sObjectEvent.setParams({
        "recordId": Acctid,
        "slideDevName": "detail"
    });
    sObjectEvent.fire();



Or you can use the Lightning date service or recordForm to set the values with the code