web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

method is internal and can be called only from within the same module or assembly

(1) ShareShare
ReportReport
Posted on by 558
Hi
 
I tried to recreated some method from Subscription Billing to make it automatic process by batch job.
 
In one of their standard table "SubBillScheduleTableTmp", based on this standard form : SubBillCreateBillingSchedule, there is this method to calculate field SubBillEndDate :
 
To me this code able to "re-use" in my code, so I have this in my class:
 
SubBillScheduleTableTmp tmpSubBill;
ProjTable projTableTM;

tmpSubBill.clear();
tmpSubBill.initValue();
tmpSubBill.CustAccount = projTableTM.CustAccount;
tmpSubBill.SubBillStartDate = projTableTM.CommencementDate;
tmpSubBill.SubBillNumOfPeriods = projTableTM.LockPeriod;


SubBillParameters subBillParameters = SubBillParameters::find();
tmpSubBill.SubBillEndDate = SubBillScheduleTable::calculateEndDateFromNumPeriods(
        tmpSubBill.SubBillInterval,
        tmpSubBill.SubBillNumOfPeriods,
        tmpSubBill.SubBillStartDate,
        tmpSubBill.SubBillEndDate,
        tmpSubBill.SubBillFrequency,
        subBillParameters.SubBillAlignToMonth);


It seems fine to me, but I don't know why, it is throw me error saying "its internal and can be called only from within the same module or assembly"
 
If I checked, the method does "internal", but why in the standard form "SubBillCreateBillingSchedule", it is able to use this method for "SubBillScheduleTableTmp"
 
May I get a view what went wrong ? My model already have the reference to SubscriptionBilling model, btw.
 
Thanks
 
Categories:
I have the same question (0)
  • Verified answer
    Waed Ayyad Profile Picture
    9,135 Super User 2026 Season 1 on at
    Hi,
     
    "When you mark a class or method as internal, then it can only be accessed from within the module where it is defined. So, you can't use it on your custom model".
     
    You can check the following blog about internal access modifier:
     
    As a workaround maybe create new method as duplicate from the original one, but you need to make sure to apply any changes MS will add to this method on the incoming releases.
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 620

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 521 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans