cancel
Showing results for 
Search instead for 
Did you mean: 

Action POST not possible; action is disabled - posting Journal Entry Voucher in ByD

abelousov
Active Participant

Hi, Colleagues,

I managed to create Journal Entry Vouchers in ABSL (from Custom BO action), but when I try to post the Journal Entry Voucher I get the error message: "Action POST not possible; action is disabled".

Sometimes the method Post works and Vouchers are posted, but I cannot find out what the fault/success cause is.

I created several Journal Entry Vouchers manually in the standard Work Center View, but their posting in ABSL gives the same message.

All Journal Entry Vouchers (created both in ABSL and in the standard Work Center View) can be posted by option Action -> Post of the standard Work Center View, though.

Are there any ideas?

Thank you.

Action-PostAccountingEntry.absl

import ABSL;
import AP.FinancialAccounting.Global;
import AP.Common.GDT as apCommonGDT;
import AP.FO.CompanyFinancialsProcessControl.Global;
import AP.FO.MOM.Global;

var query = AccountingEntry.QueryByElements;
var selectionParams = query.CreateSelectionParams();
selectionParams.Add(query.ID.content, "I", "EQ", this.AccountingEntryID.content.RemoveLeadingZeros() );
var result = query.Execute ( selectionParams );
var journalEntryVoucher = result.GetFirst();

if ( journalEntryVoucher.IsSet() ) {
	journalEntryVoucher.Post();
}

return;

Accepted Solutions (1)

Accepted Solutions (1)

Dear Alexsei,

the action "post" in the UI is a combination of various actions. Can you please try this please: first "SubmitForPosting" and then "post".

Best regards

marlene

kostadin_terziev
Participant
0 Kudos

Dear marlene.katzschner ,

What about cancelling a journal entry voucher from ABSL.

When i debug the code it calls JEV.Cancel(), but the status in the system stays Posted.

If i try to reverse it through the UI, it is successfully cancelled...

Is the action cancel also a combination of various actions?

Should i do something else before calling cancel?

Thanks,

Kostadin

Answers (1)

Answers (1)

abelousov
Active Participant
0 Kudos

Thank you, Marlene,

It works so, indeed.

	journalEntryVoucher.SubmitForPosting();
	journalEntryVoucher.Post();

Many thanks,

Aleksei