Hi Everyone,
we are using custom extension in the latest Business Central to split a Cash receipt journal line into multiple lines to separate the actual revenue vs the tax. The cash receipt journal line is added from a prepayment invoice. we were using the "OnBeforeInsertGenJLine" event to split the journal line into 2 using the 'Init' & 'Insert' functions on the 'Gen. Journal Line' record. This was all working fine until Business central got updated few weeks back and now this custom code does not work. It goes thru the code, but while posting it throws this error to the UI
"There is no Cust. Ledger Entry within the filter. Filters: Customer No.: XXXXX, Document Type: Invoice, Document No.: PP-INV00XXXX, Open: Yes"
Have anyone faced similar issue or is there a better way to split the journal lines on the cash receipt?
Any suggestion is greatly appreciated!
Thank you.