cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Billy_C
Helper V
Helper V

Recursive Sub processes

Hi there,

 

So I am having an issue with one of my flows where I need to recursively execute a part of my flow.

Let me explain the situation and what I am trying to achieve.

 

Let start with the tables and there relations:

Tables: Quote, Quote line, Article, Bundle Item, Staffel.

So I start of with a Quote that has multiple Quote lines and calculates the total price of all the lines. Each Quote line therefore is connected with a specific article and each article has multiple staffels in order to be able to give certain discounts depending on the amount that is being bought. Now an Article has a field called article type, being hardware, software, bundle, etc and recurring as in once, monthly, quartly, yearly, etc. So when a quote line has been made it runs a flow to detect what the prices are for that specific article based on quantity and its type and its recurring value. Now I also integrated a method to auto create delivery costs for that company when an article is of type hardware. When the article is of type bundle you are able to add other articles by adding bundle items and you can set the article for a bundle item aswell as its quantity and prices are automatically determined using a different flow. Now it is also possible to have a bundle inside of another bundle so price determination is sometimes a bit complex.

 

Now I am trying to expand the flow of "set the prices of a quoteline" by adding an implementation for when article type is a bundle. So if the article is of type bundle then I retrieve the article information and I list all bundle items of that article and loop over it and if that article is of type hardware then I need to add a delivery cost for it.

 

Problem is that if the article of type bundle contains articles that is also of type bundle I would need to do the same steps from before so it would be a recursive loop except I don't know how I need to do this. Also to be able to achieve this I would need the information from both the quote as the bundle itself.

 

So my question is it possible to recursively loop over something that requires ids from 2 different types of records and how do you do it, if not what is the best method to achieve this?

 

If any other information is needed, feel free to ask away!

 

Thanks in advance,

 

Billy Cottrell

0 REPLIES 0

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (62,218)