Hi guys,
When trying to use this method :
SubBillDeferralScheduleCreate::createScheduleFromCustInvoice(custInvoiceTrans.SalesId, 0, custInvoiceTrans.InvoiceId, true);
I'm hit this error : Method 'createScheduleFromCustInvoice' is internal and can be called only from within the same module or assembly.
May I know what is best if I still need to call or run the procedure inside ? Is by copying the method into my custom class would be fine ? or is there any other workaround ?
This method actually coming from Extension Class built by Microsoft self, related to Subscription Billing feature ->
internal final class SalesInvoiceJournalPostSubBill_Extension
There is one method inside the mentioned class which I would like to run as well in my custom class, specifically from this method :
private void createDeferralSchedule() { if (SubBillDeferralEnableFeature::isEnabled()) { CustInvoiceJour custInvoiceJour; ProjProposalJour projProposalJour; SalesParmTable salesParmTable; if (!this) { return; } if (SubBillProjectEnableFeature::isEnabled() && (this is SalesInvoiceJournalPostProj)) { projProposalJour = this.parmProjProposalJour(); parmJournalTableBuffer = this.parmJournalTable(); if (parmJournalTableBuffer is SalesParmTable) { salesParmTable = parmJournalTableBuffer; } SubBillDeferralScheduleCreate::createScheduleFromProjInvoice(salesParmTable.SalesId, 0, projProposalJour, true); } else { parmJournalTableBuffer = this.parmJournalTable(); if (parmJournalTableBuffer is CustInvoiceJour) { custInvoiceJour = parmJournalTableBuffer; } if (!custInvoiceJour.InvoiceId) { // pro forma, no processing should be done return; } if (custInvoiceJour.SalesId != '') { SubBillDeferralScheduleCreate::createScheduleFromCustInvoice(custInvoiceJour.SalesId, 0, custInvoiceJour.InvoiceId, true); //Create schedule for charges SubBillDeferralScheduleCreate::createSalesLineChargesSchedule(custInvoiceJour.SalesId, 0, custInvoiceJour.InvoiceId); } } } }
I would want my class to execute the one in last section of Else condition.
May I have some advice.
Thanks