<div dir="ltr"><div><span class="" style="white-space:pre">             </span>function getId(){</div><div><span class="" style="white-space:pre">                  </span>return $this->focus->id;</div><div><span class="" style="white-space:pre">             </span>}</div>
<div><br></div><div>You don't need to split it on x, it's a crmid not a wsid</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 30, 2013 at 11:24 AM, Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is this a daft Idea?<br>
<br>
My customer would like records that get set to certain status to be deleted (Moved to the recycle bin).<br>
<br>
So I created a simple Custom Workflow function:<br>
<br>
function deleteRecord($entity) {<br>
        $adb = PearDatabase::getInstance();<br>
        <br>
        // Get the triggering Account id<br>
        $org = explode("x", $entity->getId());<br>
        $orgid = $org[1];<br>
        <br>
        $entity->trash("Accounts", $orgid);<br>
}<br>
<br>
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.<br>
<br>
Any thoughts anyone?<br>
<br>
Cheers<span class="HOEnZb"><font color="#888888"><br>
<br>
Al<br>
<br>
-- <br>
Libertus Solutions<br>
<a href="http://www.libertus.co.uk" target="_blank">http://www.libertus.co.uk</a><br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</font></span></blockquote></div><br></div>