SBX - Search With Button

SBX - Forum Post Title

Codeunit - Event Subscriber.

Microsoft Dynamics NAV Forum

Armela Kamenica asked a question on 5 Dec 2018 2:30 PM

Question Status

Suggested Answer
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 ?



Reply
Suggested Answer

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.

Reply
Armela Kamenica responded on 6 Dec 2018 5:11 AM

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.

Reply
Suggested Answer

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.

Reply
Armela Kamenica responded on 6 Dec 2018 5:33 AM

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.

Reply
Suggested Answer

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

Reply
Suggested Answer

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.

Reply
Suggested Answer

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.

Reply
Suggested Answer

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

Reply

SBX - Two Col Forum

SBX - Migrated JS