cant create a ticket in workflow if the account (organization) field is present
Here is how to reproduce the error:
The problem is in the generated request:
As you can see, the submitted form has a "prent_id" field with the value "related_to". That is because the "Organization Name" field in the tickets (HelpDesk) module is called "parent_id". "related_to" refers to "Organization Name" in the Opportunities (Potentials) module.
Specific fields of all requests are validated when creating a Vtiger_Request
instance by calling Vtiger_Functions::validateRequestParameters()
:
That's when the problem comes: parent_id is a field that must contain an id (integer). When the validation finds the string "related_to", a 400 Bad Request
http code response is sent back to the browser.
I think the way to fix this would be to modify the ajax request produced in Settings_Workflows_Edit_Js
inside the functionregisterSaveTaskSubmitEvent()
so that it doesn't include the field mappings as individual fields in the request, because there's already a json field called field_value_mapping
which is the one used. The other ones are redundant.