We have overrided New Button with aura component for custom object,which has a master detail with Account, When I click on New Button from the Account related List , the Account should be populate , I have used below code,its working on PC ,but not in Salesfoce Application, How to populate Account name on the record page ,when we click New Button ,from the Account related List in Ipad. Code for the PC,but getting error in Ipad.
init: function(cmp, event, helper) {
var pageRef = cmp.get("v.pageReference");
var state = pageRef.state;
var base64Context = state.inContextOfRef;
if (base64Context.startsWith("1.")) {
base64Context = base64Context.substring(2);
}
var addressableContext = JSON.parse(window.atob(base64Context));
cmp.set("v.recordId", addressableContext.attributes.recordId);
}