Is it possible to redirect to the associated opportunity record after converting a lead?

I am interested in redirecting to the associated opportunity record once the lead is converted.

I know that I would achieve this by overriding custom-main.js in custom/modules/Leads/clients/base/layouts/convert-main/convert-main.js by editing this line:

app.router.record('Leads', leadsModel.id);

But I'm not sure what the correct way is to reference the associated opportunity record.

Any advice?

Thanks.

Parents Reply Children
  • Thanks for your response hats

    It seems like it initially wants to redirect to the opportunity that is being created when converting the lead, however it goes back to the #Leads url and displays

    Data not available

    Page does not exist or you do not have permission to access this page.

    Please try again. If the error persists, please contact your Sugar Administrator.

    Go back to previous page.

    Is your code assuming there is already an opportunity associated with the lead prior to conversion?