locked
check the status of task using plugin RRS feed

  • Question

  • I need a plugin to check the status of the task related to the specific record... If all the tasks are in closed state then the field "abc" should be enabled .. if any of the tasks is in open state then the field should be in disabled state...
    Thursday, April 10, 2014 8:18 AM

Answers

  • Hi,

    To achieve your requirement, you could create a custom field (two options) on the parent object of the task to indicate whether all task are closed. This field should be added to the form and you could set the visible default to false (don't show it on the form).

    Your plugin will be registered on create and setstate message of task that has regarding to as the parent object type. Then query all related Open tasks, if it returns anything, set the custom field to true, otherwise false.

    Then on your form (depends on your CRM version) you could write javascript file onload event or using business rule to enable/disable your custom field. 

    I hope it answer your question.

    • Marked as answer by Amy.4 Thursday, April 10, 2014 10:52 AM
    Thursday, April 10, 2014 10:03 AM