locked
disable field till the task is marked a complete RRS feed

  • Question

  • I have created a task for one of the users.

    I also have a field abc on the case form. This field should be in enable only if the task is marked as complete.. else the field shud be in disable form.. I need to do it ussing javascript

    Tuesday, March 4, 2014 4:52 AM

Answers

  • by OData retrieve the task that belongs to the case and check the status if its completed enable the field...

    search on how to retrieve by Odata you plenty of samples


    ms crm

    • Marked as answer by Amy.4 Thursday, March 6, 2014 11:09 AM
    Tuesday, March 4, 2014 7:16 AM

All replies

  • My exact requirement is as below :

    1. There is a field on case form i.e ==>Case stage = type = optionset 
    2. If case stage value == case circulation .. Then create a task for user 1.
    3.  this user cannot change the field called "case stage" on the case form Till the task is marked as complete by the user ..
    Tuesday, March 4, 2014 5:46 AM
  • Hi,

    You can do something like this

    1.Create a postupdate plugin on field "Case Stage".

    2.Inside plugin check the status of the task.If it is not completed throw invalid plugin exception with message.

    hth


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in

    Tuesday, March 4, 2014 6:28 AM
  • by OData retrieve the task that belongs to the case and check the status if its completed enable the field...

    search on how to retrieve by Odata you plenty of samples


    ms crm

    • Marked as answer by Amy.4 Thursday, March 6, 2014 11:09 AM
    Tuesday, March 4, 2014 7:16 AM
  • Hi Amy,

    I would suggest the following solution.

    Write a Plug-in and register it against "Case" Post Update. Inside Plug-in check if Case Stage == Case Circulation, create a Task against that Case. You will find plenty of sample in the CRM SDK for Plug-ins and yours is a simple one; so it shouldn't be a hard to code one. This should meet your first two requirements 1 and 2.

    For the third requirement, use JavaScript onLoad of Case form to check if there are any open tasks against that case. If yes, then disable the Case Stage field. Again, you will find samples for this in the CRM SDK. Use the SDK.REST.js provided by Microsoft to make the REST calls. Additionally, you might use the oData Query Designer to form the select query.


    Admin QuikView Solution for CRM 2013

    Tuesday, March 4, 2014 9:36 AM