web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Setting automated Due Date for specific Task Form

(0) ShareShare
ReportReport
Posted on by

I have multiple task forms that are used for various reasons, and I just created a new one that will always need the due date to be set for 2 hours after creation. I figured I could use a workflow to accomplish this, but I cannot figure out how to configure the check condition to look for a specific Task Form. Am I missing something, or is such a thing not possible?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    That would be really complicated to implement it through workflow. As for me it is easier to use JavaScript for that purpose similar to following:

    var formname = Xrm.Page.ui.formSelector.getCurrentItem().getLabel();

    if (formname === 'your special form name here'){

    Xrm.Page.getAttribute('duration').setValue(<your duration here>);

    }

    Also you can check this article as a reference - msdn.microsoft.com/.../gg309560.aspx

  • Suggested answer
    Community Member Profile Picture
    on at

    I would do this with a simple calculated field. Create a new field:

     Calc_5F00_Field_5F00_Edit.png

    Edit the field:

    Calc_5F00_Field_5F00_Edit.png

    Put the Field anywhere you want on the form, and it will add 2 hours to the Created on field: 

    Calc_5F00_Field_5F00_Form.png

    This should solve that issue. Please mark as Verified if this helped!

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    @Christian,

    Just curious where do you have a condition that tells that for form A custom field is populated in one way and for form B it is populated in other way. As for me for any type of form your field always will have the same value. Am I right?

  • Suggested answer
    Community Member Profile Picture
    on at

    I am not sure if that is a requirement. But if you needed that, you could create different calculated fields and put them on the different forms. The way above you will always get the result of created on plus 2 hours. Seems to me, either way would satisfy the need, just different approaches. With the calculated field you will still need a workflow to populate the Due Date field. I have done this and it works perfectly. Entire process took less than 15 minutes. 

    1830.Task.png

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    It looks like it is a requirement. Just re-read first sentence. Ton of fields obviously not the most elegant solution...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans