Question/Problem with foreach loop

2011-05-18 Thread CM Analyst
Hi, In this code, the intent is to iterate through the tasks and modify the ID field. The Task record (entity) should not be modified if it's state equals "Completed". When I run this routine, there are two problems: Problem 1) The "if" statement is not being evaluated. The record (even if it

Re: Question/Problem with foreach loop

2011-05-18 Thread Jim Gibson
On 5/18/11 Wed May 18, 2011 5:06 PM, "CM Analyst" scribbled: > Hi, > > In this code, the intent is to iterate through the tasks and modify the ID > field. The Task record (entity) should not be modified if it's state equals > "Completed". > > When I run this routine, there are two problems:

Re: Question/Problem with foreach loop

2011-05-18 Thread Uri Guttman
> "CA" == CM Analyst writes: CA> my $taskEntity = $session->GetEntity ('almtask', $_); that gets a perl object in $taskEntity. CA> $taskEntity->GetFieldValue(state)->GetValue(); where is the value being assigned to? $taskEntity is not being modified or set in that line of code. it is j

Re: Question/Problem with foreach loop

2011-06-07 Thread CM Analyst
Gents, Sorry for my delayed response. Thank you for your suggestions. Based on your feedback, I made the following changes, and the hook is now working as expected. Thanks a million! my $taskstate = $taskEntity->GetFieldValue(state)->GetValue();     $session->OutputDebugString ("Task's state