Division in Workflows RRS feed

  • Question

  • Is it possible to apply a mathematical divison onto an entity attribute, whcih is calculated from a number of fields. Let's say attribute x of the Contact; is the dvision of fields y by field z.  I would like to automate this calculation through a workflow.  Is it possible?
    Monday, November 23, 2009 10:03 AM


All replies

  • you can apply only certain mathematical calculation in standard workflow...refer http://dmcrm.blogspot.com/2008/09/workflow-increment-by.html article for more information on this..

    if you want to do any thing else you can create your own custom workflow to achieve this..
    Monday, November 23, 2009 10:25 AM
  • What does this involve?  Would I require .net development or is there an easier procedure?  I want to minimise the customisations as much as possible
    Monday, November 23, 2009 10:35 AM
  • Hi Stephen,

    yes, you can write really simple custom workflow activity (in .Net) which takes two inputs (in decimal field) and then returns you result of division.

    it would be really generic so you can use this else where in your application as well..

    following article shows some example custom workflow..

    of couse, your custom workflow will be different but you can use above example to get started..

    let me know if you need more help regarding this..

    Monday, November 23, 2009 10:53 AM
  • Hi Mayank,

    Thanks alot for your help.  I am still new to CRM, therefore apologies if this question has been to simple.  I'll be checking the links provided and try to apply it for the workflows.
    Monday, November 23, 2009 12:45 PM
  • By Any chance, may I ask you for a textbook which gives a thorough introduction to actual development in CRM?
    Monday, November 23, 2009 1:08 PM
  • The business productivity workflow accelerator has divide as one of the operators it adds to workflow.


    Leon Tribe

    Want to hear me talk about all things CRM? Check out my blog


    or hear me tweet @leontribe
    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
    Monday, November 23, 2009 5:35 PM
  • Thanks for this release, it seems to be quite an efficient one, definitely gives the user much more functionality.  I've got an issue to deal with.  I need to compute a net total in the opportunity product, and the total is to be saved in the Opportunity Table.  Both fields are new attributes and besides the total need to be updated every time an opportunity product is created or deteled or even just modified.  Updating teh field when the record is created is quite simple, but what about when updating or deteling the record. I would need the total to get updated.  Is this possible in some way or another using the workflows?

    Monday, November 23, 2009 8:17 PM
  • You can run a workflow from the opportunity product so you can definitely do something to an opportunity product and then make a change to its parent opportunity. In this case I'm guessing some sort of sum of all the opp products on the opportunity. There is an increment feature in workflow which might do the trick, although a plugin solution would probably be more robust.

    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 Monday, December 21, 2009 2:40 AM
    Monday, December 21, 2009 2:40 AM