Not able to get Thread Prev Count
Content
Hi All,
I have a Requirement to send an SMS(Contact) when an agent create a response thread .For that i have to check whether the thread is updated , for this i have to compare current count and previous count ,I am able to get the current count .
Let me know how can get the previous thread count.
Thanks in Adnace
Sarath
Code Snippet
public static function apply($run_mode, $action, $obj, $n_cycles) { $prevCount=0; $prevCount = count($obj->prev->Threads); if($count == 0) $obj->Threads = new RNCPHP1\ThreadArray(); $obj->Threads[$count]= new RNCPHP1\Thread(); $obj->Threads[$count]->EntryType = new RNCPHP1\NamedIDOptList(); $obj->Threads[$count]->EntryType->ID = 3; $obj->Threads[$count]->Text = " Prev count - ".$prevCount; $obj->save(); }
0