[Vtigercrm-developers] Silly Question? Delete entity in Workflow Funtion?

Adam Heinz amh at metricwise.net
Tue Jul 30 17:50:29 UTC 2013


 function getId(){
return $this->focus->id;
}

You don't need to split it on x, it's a crmid not a wsid


On Tue, Jul 30, 2013 at 11:24 AM, Alan Lord (News) <alanslists at gmail.com>wrote:

> Is this a daft Idea?
>
> My customer would like records that get set to certain status to be
> deleted (Moved to the recycle bin).
>
> So I created a simple Custom Workflow function:
>
> function deleteRecord($entity) {
>         $adb = PearDatabase::getInstance();
>
>         // Get the triggering Account id
>         $org = explode("x", $entity->getId());
>         $orgid = $org[1];
>
>         $entity->trash("Accounts", $orgid);
> }
>
> But it isn't working and I can't help thinking this is not really a good
> idea... When you are editing the status via Ajax and it triggers this
> workflow... Hmmm.
>
> Any thoughts anyone?
>
> Cheers
>
> Al
>
> --
> Libertus Solutions
> http://www.libertus.co.uk
>
> ______________________________**_________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130730/7ee35f0e/attachment-0001.html>


More information about the vtigercrm-developers mailing list