Using the <lightning:workspaceapi>
tag and calling the same reuseable component twice (once for edit and once for view) does not seem to let me open the edit page modal and open a new tab for viewing all at once. Instead, the edit modal gets removed as the view tab is created. Since the edit page is a standard record page type, I can't seem to get events from it.
Tab component basic code:
var workspaceAPI = component.find("workspace");
workspaceAPI.openTab({
pageReference: {
"type": "standard__recordPage",
"attributes": {
"recordId": component.get("v.thisRecordId"),
"objectApiName": component.get("v.thisObj"),
"actionName": component.get("v.thisAction")
}
}
openTab
and then, after the promise resolves, fire another one but with the parameters specifying that it is the edit page instead of the record page? In theory that should open the record, and then open the edit modal. After the user saves it, it should display the record previously opened.