Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Getting tangled in infinite loop with workflow creating record on entity running it

$
0
0

I have a workflow that fires on create of a payment adjustment.  The adjustment needs to result in two adjustment records; one as a debit and the other as a credit.  My problem is that the workflow running on create of the adjustment needs to update the record being created to indicate it's a debit and then create a new record with some of the same data, but as a credit.  

I can't seem to figure out how to trigger the workflow on something that doesn't exist on both records which creates an infinite loop?   The two records will look like this:

User creates Adjustment Record:

  1. Budget Line=B
  2. Cost Code=C
  3. Account Code=A
  4. Adjustment Type = BL/CC Change 
  5. Credit/Debit (hidden so no selection)

On create, a workflow updates the Adjustment record to set Credit/Debit to Debit.

Workflow then creates Record 2 (ha!  on create triggered again).  This record is for the off-setting Credit.

  1. Budget Line=D
  2. Cost Code=E
  3. Account Code=F
  4. Adjustment Type = BL/CC Change 
  5. Credit/Debit = Credit

How can I trigger the workflow so it's not an infinite loop?  I've been working on this problem for two days and have tried every variation I can think of; i.e., On Create, on change of Budget Line (exists for DR and CR), etc., etc.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>