You need to sign in to do that
Don't have an account?
enossir
Lightning component to VF page error "Attempt to de-reference a null object "
So i'm dealing with a classic to lightning converision and have a object that has a related object in which there is a list buttton that when clicked in lightning doesn't work.
So since i can't do a quick action to VF page (crazy amounts of redesign)
I'm doing a quick actions ---> component ---> VF page
I use no header....because i don't want a header, i just want the Javascript to execute pass the record and start the VF page that's it nothing more.
Now here's the issue is when i click on the quick action
Attempt to de-reference a null object
/apex/New_Blue?id={!Account.Id}
So since i can't do a quick action to VF page (crazy amounts of redesign)
I'm doing a quick actions ---> component ---> VF page
<aura:component controller="New_Blue_ctl" implements="force:appHostable,force:lightningQuickActionWithoutHeader,flexipage:availableForAllPageTypes,force:hasRecordId" access="global" > <aura:handler name="init" value="{!this}" action="{!c.newBlue}"/> </aura:component>
I use no header....because i don't want a header, i just want the Javascript to execute pass the record and start the VF page that's it nothing more.
({ newBlue : function(component, event, helper) { var urlEvent = $A.get("e.force:navigateToURL"); var recordId = component.get("v.recordId"); urlEvent.setParams({ "url": "/apex/New_Blue?id=" + recordId, "isredirect": "true" }); urlEvent.fire(); } })
Now here's the issue is when i click on the quick action
Attempt to de-reference a null object
It gives me the record id as it should.
Maybe i need to use "<domianName>--test.lightning.force.com/apex/New_Blue?id=" instead of "/apex/New_Blue?id=" Or possibly use the classic url?
It gives me "attempt to de-referene a null object." in the dev console it says line 63 of the apex class related to the VF page has failed, specifically
sot = parentId.getSObjectType();
where sot is private SObjectType sot {get; set;}