locked
CRM 2011 - Workflow RRS feed

  • Question

  • Hello,

    I am trying to run a dynamic workflow by comparing 2 fields (text fields) on two seperate entities. Can anyone instruct me on how to do this, I am new to CRM 2011 and getting slightly confused with the below scenario:

    I have 2 entities, E1 and E2. On E1 I have a text field called F1 and on E2 I have a text field called F2. I am trying to create a workflow where I start with a check condition, that E1 - F1 = E2(F2) - then once this has completed a task gets created (testing environment). I suspect I need to create a relationship on E1 to E2, but not entirely sure.

    Can anyone assist.

    Many Thanks

    Paul

    Monday, August 5, 2013 3:52 PM

All replies

  • Hi Paul,

    If you want to compare the E1.F1 value against the F2 value for a single E2 record, then you will need a lookup from E1 to E2; otherwise if there is no relationship the workflow can't know which E2 record to compare with.

    If you actually want check if F1 matches F2 on any E2 record, then this is not possibly using the out-of-box workflow, however you could do this with a custom workflow activity (code).

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Tuesday, August 6, 2013 8:53 AM
  • Thanks for your response Paul, one of the entities is system and 1 custom. The two fields F1 and F2 are both text fields and I have created the relationship (lookup) between the entities. When I run the workflow, it gets stuck on the check condition when I ask E1: F1 = F2 (E2). Any ideas on a work around using the out of the box product as I dont have alot of experience with custom workflow activity.

    Thanks

    Tuesday, August 6, 2013 7:47 PM
  • What is the error you are getting?

    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Tuesday, August 6, 2013 7:53 PM
  • Thanks again for he quick response Paul, its not so much an error, please see the below:

    as you can see it just sticks on the check condition, the company or site is the system account (renamed), address1: post office box is simply a text field, the appeals lookup is the relationship to the appeals custom entity and the CVS ref is another text field.

    Wednesday, August 7, 2013 7:37 AM
  • Hmm looks like the values are not the same, or at the least the workflow is evaluating them as being different.

    Are you sure the values are identical? Same casing and everything?

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Wednesday, August 7, 2013 7:40 AM
  • I've also just performed a quick test to confirm this. Note that it can only compare with the value specified in your lookup (in my case the Primary Contact lookup on account):


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Wednesday, August 7, 2013 7:55 AM
  • I have setup the same workflow as the one you displayed, and it worked absolutely fine. So I think the issue is in your case your doing this from system entity to system entity with no problems, in my case its system entity (account) to custom entity (appeals). Could you try creating a workflow in my scenario - system to custom, by applying the comparing fields logic and let me know if this works?


    • Edited by samrr1875 Wednesday, August 7, 2013 11:44 AM additional information
    Wednesday, August 7, 2013 11:14 AM
  • Yep, I tried from Account with a lookup to a custom entity, and matched the account web site with the custom entities name, and it still matched perfectly.

    Can you double check the lookup between E1 and E2, and make sure that the lookup has a reference to an E2 record. Then make sure the F1 value on your E1 entity exactly matches the F2 value on the E2 entity linked with your E1 record.


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Wednesday, August 7, 2013 8:57 PM
  • I've checked the two values and they are identical. Could you please display the workflow criteria for me so I can ensure that I'm understanding the lookup logic (the successful workflow from your account to custom entity).

    Many Thanks


    • Edited by samrr1875 Thursday, August 8, 2013 11:25 AM
    Thursday, August 8, 2013 11:24 AM
  • Here are some screenshots of my workflow and records:

    If it's still not working can you post the same screenshots (showing the lookup value on E1 and the E2 record with the matching value).

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Thursday, August 8, 2013 10:04 PM
  • I think I know where I'm going wrong, how do you match the lookup values. I think my knowledge is letting me down here, I'm only able to link dynamic value lookup to a lookup so I suspect there is a configuration I am not aware of.

    Friday, August 9, 2013 9:17 AM
  • Have you actually associated an Appeals record to the Site? That is to say, when you are on the Site, does your Appeals Lookup field have a value? Remember that you are only matching your Post Office Box with the CVS Reference on that ONE Appeals record. Any other Appeal records in your system will not be evaluated, only the one associated.

    The dynamic value that I specified above is simply referring to the CVS Reference value on the associated Appeal.

    If that still doesn't make sense can you please explain to me again what functionality you are actually trying to achieve? As I may have misunderstood the first time.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Friday, August 9, 2013 9:27 AM
  • As you can see above, the text field = CSV0046HJA, and when I enter that code into my lookup (Appeal). It selects it fine so the Lookup works exactly how I like. When I create a workflow:

    And I select CVS Reference field, and execute I get the below (which was my initial problem), all I need to do is get the Address1: Post office box to match the CVS Reference number in the appeals entity.

    Apologies if this is dragging out, its driving me insane! lol. I really do appreciate your assistance.

    Thanks

    Friday, August 9, 2013 9:44 AM
    • Edited by samrr1875 Friday, August 9, 2013 9:45 AM
    Friday, August 9, 2013 9:45 AM
  • Ok try this. Create another temporary workflow, have it run on-demand, and just have it set the Site - Address 1: Post Office Box to Equal the Lookup (Appeal) - CVS Reference. Run this workflow once on your current record, and then when it has successfully fired, close and reopen the form. Check the new value of your Post Office Box.

    If the value is still the same then I'm out of ideas, and it could be a rollup issue (I've been testing on CRM Online by the way).

    If the value is blank (or different), then double check to make sure the primary field is actually the CVS Reference field, and make sure the lookup value was being saved to your Site before running the workflow.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Friday, August 9, 2013 9:55 AM
  • check your FB messages Paul.

    Sam

    Friday, August 9, 2013 11:05 AM
  • Just sent you a message. Can teamviewer if needed.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Friday, August 9, 2013 11:18 AM
  • Hi Sam,

    Haven't heard from you since the teamviewer session. Did you manage to resolve the issue?

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Tuesday, August 13, 2013 8:44 PM