I have an Apex logic that checks: On click of New button of Opportunity, if the logged-in user has permission to create records, reconstruct the PageReference with the default url like below:
https://myinstance.my.salesforce.com/006/e?retURL=%2F006%3Ffcf%3D00Ba0000009uqqV&_CONFIRMATIONTOKEN=VmpFPSxNakF4Tnkwd015MHlOMVF4TURveU5Eb3hNeTQzT1RSYSxiTm9LeV9XdEpKQVMtRUdzb3pHUVdZLE0yUTJPVFJs&common.udd.actions.ActionsUtilORIG_URI=%2F006%2Fe&RecordType=01230000000rrnN&ent=Opportunity
If I do it in Lightning I am able to redirect to land on new record opportunity page but I am getting an error:
I know this is related to constructing the same using the URLEncoding appending in Aloha url
/one/one.app?source=aloha#/sObject/[recordId]/view?fv0={!Object__c.field}
But I am not able to figure out, how should I make and which part of the url has to be encoded. Please suggest.