locked
execute workflow every day RRS feed

  • Question

  • hello,

    /!\ hard level question !

    I have to create a workflow. this workflow have to update a date field according to a field in his parent entity.

    Explanation :

    parentEntity = Invoices

    childEntity = Invoices details

    i have an Invoice date in invoices entity and I need this date in all details invoices of the invoice... I hope I'm clear

    But the thing is : there is a special process for creating those invoices and details invoices, every night a tool (.exe) remove all the stuff and create invoices and details invoices according to a .csv file.

    I have an idea how it works but can't change it.

    So I need to create a workflow updating the field every night. it has to scan all details invoices and update the field.

    Is it possible ?

    Tuesday, January 17, 2012 1:45 PM

Answers

  • You could create a plugin as an alternate solution. Register the plugin to fire on Create of Invoice Detail in the Pre stage. Read the Invoice date of the invoice attached to the invoice detail and copy it over to the invoice detail.

    This way the invoice details when created would be created with the correct date picked up from the invoice.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Saturday, January 21, 2012 2:25 AM

All replies

  • You can just create a similar process (.exe) that runs every night after the current process. A good place to start is the quickstart  sample project (samplecode\cs\quickstart) in the SDK. It has everything you need to connect to CRM, all you have to do is pass in the username and password and add the code for your logic.

    http://www.microsoft.com/download/en/details.aspx?id=24004

    Tuesday, January 17, 2012 2:10 PM
  • Hi,

    You can use the following link as a reference how to create a recursive workflow.

    http://www.dynamicscrmtrickbag.com/2010/06/02/recursive-workflows/


    Regards, Kyaw Kyaw Tun
    Friday, January 20, 2012 4:42 AM
  • You could create a plugin as an alternate solution. Register the plugin to fire on Create of Invoice Detail in the Pre stage. Read the Invoice date of the invoice attached to the invoice detail and copy it over to the invoice detail.

    This way the invoice details when created would be created with the correct date picked up from the invoice.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Saturday, January 21, 2012 2:25 AM