locked
populating date field value automatically through workflow RRS feed

  • Question

  • Hello I want a Field value populated automatically through workflow.The field is a DATE field. how can i perform calculation(add) one date field value with another field value to populate another date. Dynamic values of date hw can we add a period to a date to produce another date.Bt only through workflow no javascript. Plz Help !!
    Wednesday, December 7, 2011 6:06 AM

Answers

  • No you cannot. With workflow you can set the value of a date field relative to another date field e.g. 3 days before <other date field>. You could possibly do some very complicated workflow loop to decrement the duration value and add days to the date field but the better solution would be a few lines of jscript, which will do the job and it relatively simple to implement.

    Leon Tribe


    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
    • Proposed as answer by Leon TribeMVP Tuesday, December 13, 2011 12:38 AM
    • Marked as answer by Developer_2011 Tuesday, December 13, 2011 5:05 AM
    Tuesday, December 13, 2011 12:37 AM

All replies

  • Hi you can use dynamic value properties to add specific period in workflow builder. if you have bit complex requirnment and its not possible by above method then you need to write Workflow Custom activity in c# or vb.net, where you can calculate any compelx logic and add/update any field. How to develop Workflow custom activity: http://technet.microsoft.com/en-us/library/gg328515.aspx Many Thanks -Bhautik Desai xRM Technologies
    Wednesday, December 7, 2011 8:44 AM
  • Thanks For ur reply

    Bt its still using Plugins . I want to do it by CRM itself.

    For Example There is a form containing three fields

    start date , End date , Duration

    and i want whenever i enter the start date and duration the end date should be populated automatically. Start date + Duration.

    can i do it with crm .

    Thanks

     

    Wednesday, December 7, 2011 8:56 AM
  • No you cannot. With workflow you can set the value of a date field relative to another date field e.g. 3 days before <other date field>. You could possibly do some very complicated workflow loop to decrement the duration value and add days to the date field but the better solution would be a few lines of jscript, which will do the job and it relatively simple to implement.

    Leon Tribe


    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
    • Proposed as answer by Leon TribeMVP Tuesday, December 13, 2011 12:38 AM
    • Marked as answer by Developer_2011 Tuesday, December 13, 2011 5:05 AM
    Tuesday, December 13, 2011 12:37 AM