cancel
Showing results for 
Search instead for 
Did you mean: 

ForEach construct in sequential mode, is possible?

Former Member
0 Kudos

Hi,

I would like to know if it is possible to force the foreach construct sequential processing rather than parallel. Or other possible solutions you can take to process invoices in the same order in which they are stored in the file xml input.

The need is to create B1 purchase invoices with the data in an xml file.

The xml file contains several invoices precise order of issue, be loaded on B1 with the same order as in the file xm. If the insertion of an invoice fails, the subsequent should not be imported.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Antonio,

Sorry to inform you that current ForEach only support parallel process.

Just wondering your scenarios should be managed by transaction, all succeed or none commit if any failure. Not just stop the subsequent process in case of any failure.

If it is, may you try Company.StartTransaction/EndTransation with B1 function call in B1if to manage the global transaction?

Kind Regards, Yatsea

Former Member
0 Kudos

Hi Yatsea,
my need is to process invoices in the same sequence in which they are in the xml file provided by the branch.

The xml file contains all the bills one day.
Invoices must be numered from B1, in the same sequence provided by the subsidiary.

Is there a way to implement this logic?

Thank you.
Sincerely, Antonio.

Answers (0)