Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#138 Delete open workflow activities with opportunity

closed
nobody
None
5
2007-10-17
2007-07-29
Randy Martinsen
No

Updated the following code to remove any open workflow activities scheduled with opportunity when deleting the opportunity (/opportunities/delete.php)

if ($ret) {
//by Randy - find & delete all open activities scheduled by this opportunity
$sql = "UPDATE activities SET activity_record_status = 'd' WHERE on_what_table = 'opportunities' AND on_what_id = $opportunity_id
AND activity_status = 'o'";
$rst = $con->execute($sql);
header("Location: some.php?msg=opportunity_deleted");
} else {
$msg=urlencode(_("Failed to delete opportunity"));
header("Location: one.php?opportunity_id=$opportunity_id&msg=$msg");
}

Discussion

  • /opportunities/delete.php

     
    Attachments
    • status: open --> closed