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 :
Microsoft Dynamics NAV (Archived)

Codeunit - Event Subscriber.

(0) ShareShare
ReportReport
Posted on by 231
Hello there.
I have created a codeunit to handle eventSubscribers.
I have these functions among others.
What the below does, is take a custom field and pass value from the Purchase header to the vendor ledger entry.
So 2 events (one Purchheader to GenJnl and the other event from GenJnl to Vendor ledg).
This works great in my SBX environment running locally on Docker, however does not work on the client environment.
The client is running BC365 on Premise.
This codeunit has other EventSubscibers but they use table Events and they work great.
Any idea why the code below does not work on the client's environment ?
4454.screenshot.png



*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    There's no reason for not working on the customer environment if it works on your sandbox.

    Is the extension activated at customer site? You're on-premise, so try to debug the events from VS Code if possible.

  • Verified answer
    Armela Kamenica Profile Picture
    231 on at

    I am a little confused.

    So are you saying that I need to install Visual Studio on the customer's environment ? We don't have that there. I am trying to point my Visual Studio Folder (local PC)  for this on the Web environment for this customer via the settings in the Launch.json and it is now working. It is asking me for a user name and password and than it gives me an Internal error when "Dowload Symbols" or Publish.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    No sorry, what I mean is that if the extension works on your local system should work also at customer’s site. If you have a sandbox (copy of the customer’s environment) maybe you could debug this sandbox and see what happens. Otherwise it’s quite difficult to understand the problem.

  • Verified answer
    Armela Kamenica Profile Picture
    231 on at

    Thanks for your reply

    Unfortunately I don't have a Sandbox for them. I guess the only difference is that they are BC365 on premise so I was hoping someone had some knowledge of differences between Premise and cloud relating to codeunits. Any ideas who I can reach out in support ? I understand MS support does not provide much help with Extension development.  I will also reach out to Github.

    Thanks again.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    There are no differences in codeunit. You can check them by creating a Docker sandbox and pulling Microsoft/bcsandbox image. Codebase is the same.

  • Armela Kamenica Profile Picture
    231 on at

    Just wanted to post an update regarding this.

    The events worked fine when we switched the license to our Developer's license. So it has smth to do with Codeunit permissions and licensing.  We can figure it from there, but wanted to post an update in case anyone else runs into the same issue.  Thank you everyone for your input.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans