You need to sign in to do that
Don't have an account?
diwakar rajput
var navEvt = $A.get("e.force:navigateToSObject");this return undefined why? please help me to understand it
gotoRecord : function (component, event, helper) { var navEvt = $A.get("e.force:navigateToSObject"); console.log("#####"+navEvt); navEvt.setParams({ "recordId": "a0R7F000005ETrFUAW" }); navEvt.fire(); }
can you share the complete code? .. I didn't see any issue with the above code.
It’s supported in Lightning Experience, Salesforce app, and Lightning communities. If used outside, this event won’t be handled properly.
Sorry for this issue you are encountering.
May I request you please confirm if you are trying this on a desktop browser or Salesforce1?
If it is then the update from Salesforce is for LC4VF and for SF1 we still have to use sforce.one.navigatetosobject and force:navigateToSObject won't work.
Hope this will help you.
Kindly mark this as solved if the information is helpful.
Thanks,
Nagendra
Made a lightning app using Lightning app builder, and ran my component from salesforce1 . It ran successfully.
sforce.one.navigateToSObject("recordId","detail");