I’ve been doing a little bit of work with the Electronic Reporting engine in Dynamics 365 for Finance and Operations, and I ran into a little trick that I wasn’t able to find listed on any forums, Yammer groups, LCS issues, or blog posts.
WHAT WAS I TRYING TO DO?
I was creating a custom payment model to export a payment file. Since this file was going to have multiple records and could have multiple different types of payments, I needed a nice clean identifier for each record. I wanted to use a number sequence to help me, and in walks NUMSEQVALUE to help.
HOW DID NUMSEQVALUE HELP ME?
This all stems from the addition of the NUMSEQVALUE formula last year. There’s a couple of ways to use it (syntax here at Docs); I was using the NUMSEQVALUE (number sequence code) version. After creating a standard, company-specific number sequence for my records to use, I tried to add it to a new column in my data model. NUMSEQVALUE(“IDnumber”) This worked just fine for a single record, but when I tried to generate a file with more than one record, I received an error message saying the number had already been used.
WHAT WAS THE PROBLEM?
The number sequence was marked as continuous. I’m not real sure what happened during run-time, but for some reason Electronic Reporting wasn’t able to take out more than one number at a time. When I switched off the continuous checkbox on the number sequence, the file generated just as I’d expect – with multiple instances of the number sequence being used.