Getting an exception when trying to convert a Lead into an Company and Opportunity

Hi, When I try to convert a Lead to a Company or Company and opportunity I get the following workflow error. This is when I give a existing company name in the company name section.
image

But when I give a new company name under company category (as in the below image) it allows to convert that lead to a Company and opportunity.

image

How to fix this issue? Could anyone help me on this.

If its a custom workflow please provide the step 39 configuration.
Since that’s where the error happens.

Also might be worth looking at the server logs

Hi @jfortun it is not a custom workflow, it is already there when I got the docker image of the corteza

The workflow that comes with the docker image is “Convert this Lead into an Account and Opportunity”

There is no “Lead into Company and Opportunity”

@jfortun yeah, it is converted by this workflow CRM - Lead - To Account and Opportunity , we renamed the label of the button Account to Company

Have you deleted some fields on the modules “lead” “Account” or “Opportunity”?

Some fields may already have been deleted and not deleted from the workflow, leading to errors when executing the workflow.

JMatias

@jmatias , @jfortun I didn’t delete any fields in the lead creating form.

And on the ‘account’ and ‘opportunity’ module? Did you delete any field? If so, it’s needed to be deleted from the workflow too.

Hi @jmatias I think this is the 39th step,

How to find the relevant fields here.

When I add a new company name conversion happens. With an existing company the conversion doesn’t take place. Then it gives the workflow error.

That step is the creation step - the step before that one is the population of account data - there you can see which fields are being used:

Hi @jmatias here the issue comes when we try to create do the conversion with a existing company, if we try to do the conversion with a new company as in the below image there wo n’t be any workflow error.

That’s ok - that workflow should only be used when the Account/Contact does not exist yet - so, let’s say, the company already exists, that workflow can’t be triggered because the Lead is already converted.
We are talking about the workflow “Lead to Account and Opportunity”, right?

JMatias

Hi @jmatias what do you mean by that. Are you saying the process of creating and converting a lead should be for a new company should be there right. If an existing company is given then that means the lead is already converted. Is that what you mean?

If I’m correct, that workflow should only be triggered on the lead page. Because it relates the data in the workflow with the data on the lead itself;

Where do you have that automation block?

And yes, if the lead is already converted - The workflow will trigger an error - But a different one, it usually says something like “This lead is already converted”.

Hi @jmatias the automation block is in the Lead creating screen.

To resume things: you didn’t change the module “Leads” “Opportunity” & “Account”, right? The fields are the same as when we install Corteza?

@jmatias yes, fields are same, I didn’t change anything in those modules.

Strange - I just created a blank Corteza instance and the workflow has gone through without alerts or problems. Have you already saved the Lead when you try to convert it? Or you haven’t clicked on “Save” yet when trying to execute the workflow?

JMatias

Hi @jmatias I execute the workflow after I save the Lead and this issue comes when we give existing company in the company details section, when a new company is given there is no issue in workflow. (As shown in the above with screen shots).

Did you add any custom changes to the modules? Any validators or such things?
Since the error indicates you changed something in the module/workflow configuration that is now causing this.

If you didn’t change anything then its quite strange and an edge case. So we need server logs and as much actual info as possible.