After using a couple of hours trying to understand why my newly created AIF-service was not doing exactly was it was supposed to do, I found the solution.
My AIF service uses a new table to accept some value from an external system.
When a record is introduced into this table, a new ledger journal with a ledger journal line is created, and the voucher the line gets in the journal line, is updated onto my new table.
This to allow for making it possible to use customized code in an AIF service, without having to make changes to the table methods of the Generel ledger journal tables and without risking custmized code made in the Service classes being overwritten by a service wizard update of the service.
I had completed and activated my service, and was testing it.
Then I discovered that I had forgotten to call the code to create the ledger journal, on my new table's insert-method, therefor I got records in my table, but no ledger journal.
So I quickly inserted the call to the method, and tested again.
Still no general journal generated. :(
After pondering this I decided to deactivated the service and try to activate som logging, to see what was going on, and then reactivate it.
And voila, now I got my general ledger journals.
The activation of my service had of course built new CIL-code.
Conclusion:
REMEMBER to ALWAYS incrementally build CIL-code, when you change ANYTHING in AX, that is used in an AIF service.
My AIF service uses a new table to accept some value from an external system.
When a record is introduced into this table, a new ledger journal with a ledger journal line is created, and the voucher the line gets in the journal line, is updated onto my new table.
This to allow for making it possible to use customized code in an AIF service, without having to make changes to the table methods of the Generel ledger journal tables and without risking custmized code made in the Service classes being overwritten by a service wizard update of the service.
I had completed and activated my service, and was testing it.
Then I discovered that I had forgotten to call the code to create the ledger journal, on my new table's insert-method, therefor I got records in my table, but no ledger journal.
So I quickly inserted the call to the method, and tested again.
Still no general journal generated. :(
After pondering this I decided to deactivated the service and try to activate som logging, to see what was going on, and then reactivate it.
And voila, now I got my general ledger journals.
The activation of my service had of course built new CIL-code.
Conclusion:
REMEMBER to ALWAYS incrementally build CIL-code, when you change ANYTHING in AX, that is used in an AIF service.
Comments
Post a Comment