I am attempting creating a new deal based on form submit data however I get an error whenever I attempt to tie the deal to a pipeline.
For example I have a pipeline with id of “sales_pipeline” and a stage within that pipeline with an id of “appointmentscheduled”. However when I use these two in combination i get the following error;
Dealstage (appointmentscheduled) must exist within specified pipeline (sales_pipeline).
The error then goes on to list the possibly values, being;
appointmentscheduled, presentationscheduled, decisionmakerboughtin, contractsent, closedwon, closedlost,
appointmentscheduled being one of them.
Other parameters pased include;
$newDeal->setProperty(['name' => 'dealname', 'value' => $title]); $newDeal->setProperty(['name' => 'pipeline', 'value' => 'sales_pipeline']); $newDeal->setProperty(['name' => 'dealstage', 'value' => 'appointmentscheduled']); $newDeal->setAssociatedId($userId);
Not too sure why this is happening, I am also attaching the deal to a user does the user also have to be assigned to this pipeline?
Any help greatly appreciated.