Question : MS CRM - Workflow query

Hi,

I want to create a workflow query that will increment the number of minutes used by a case - using a workflow trigger on each activity for example the task entiy.  When a workflow is created it can update the case used minutes by using the "Regarding (Case)" link to the case properties.

The problem I have is when the task is not linked to a case and another entity for example a contact or an account.  Here the wokflow starts but then stops with "A record required b this workflow rule cannot be found" bacause it is not linked to a case anymore.

Point is this - I only want the workflow to run if it related to a Case or otherwise stop gracefully rather than suspend itself.

I have found a field "RegardingObjectTypeCode" in the ActivityPointerBase table which identifies the type of object that it is linked through to but it does not to be accessible using the workflow.

Any ideas anyone?  Thanks!

Answer : MS CRM - Workflow query

you can not  check object type cod in workflow as per my knowladge.


did you created a var char attribute in task.after  you create varchar attribute keep that on the form.  

write a javascript to hid that
on chage of regarding object id in task
if(crmForm.all.regardinobjectid.DataValue[0].type == <>)
{
 new_createdfield = "case"
}

hope this helps
Random Solutions  
 
programming4us programming4us