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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Custom function calls in CodeUnit-12 -Gen Jnl Line in Business central

(0) ShareShare
ReportReport
Posted on by 120

Hello Experts,

I have added a function PostEmployee in standard codeunit -Gen Jnl Line- 12 to post loans in dynamics NAV 2016, now I have upgraded this to Business Central Cloud. 

Is there any way we can add the same function in Business central? I understand we can't extend codeunit in BC but is there any  alternate other way to do the same.

This customized function is being called on same Codeunit.

I have check the event & publisher, but as I have added a customized function in standard codeunit how we do this in business central.

Any reply would be highly appreciated.

Thanks in advance.

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    it should be easy to do the same.

    first of all, you should find the right place to call your function. for example, if the function changes some fields' value after copying from Gen ledger,  you may use "OnAfterInitEmployeeLedgerEntry" event and change the value. it depends on the functionality. if you explained more we might help more

  • Lissa Profile Picture
    120 on at

    Thanks for your response. I have tried that but didn't work. Would you mind if i ask you for your email address so i can ping you in teams or send you email with details.

    Thanks again.

  • Verified answer
    Community Member Profile Picture
    on at

    you may reach me on Linkedin through my profile. I prefer not putting my email on the comment in case of having spams.

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    best you create a custom codeunit, add your function there and call from there the needed functions from cu 12.

  • Lissa Profile Picture
    120 on at

    Thanks. Your suggested even worked.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans