0
votes

Hi all I have already created some addons to SAP Business one in c#. Now what i want to do is that everytime I create a new function my addon should be able to automatically download it from a database server. What I plan is to include all these functions in a database table with columns such as (FuncName, EventType, EventForm, EventField, EventColumn, FuncCode). And there will be a globle function in my addon code which has several switch cases and so on... But how can I automatically create new function inside the source code by just reading these data from the table. Any proper guidance will be appreciated.

I'm an Intern in a software company. So I'm not that great with programming. Therefore please don't give the answers in a very complicated way :-D

********I understood that the above method is extremely difficult!!!

UPDATE: If this is a bad idea please suggest me a better way to do this. But consider that there are a lot of customers who gonna use this addon and they want to eassily download newly created functions to this addon

*** If someone alreday creadted AddOns to SAP B1 could advise me how they managed to provide updates to their Add-Ons while been registered under SAP B1 would help me a lot. Because I still couldn't solve this problem!!!

UPDATE: I already created my own updater function to a SAP Addon. In this updater function I replace the current exe file with new version's exe. And it works completely fine. But the problem occurs after registering this addOn in SAP. Because there are lot of check sums in SAP which makes the addon not working after I replace the old exe file. And I have no idea how to update my addOn without replacing the exe file. Any valuable suggestion would be highly appreciated.

2
That sounds like a horrible idea. What problem are you trying to solve? - DGibbs
@DGibbs : I added a full explanation of my problem. Maybe you could understand what my problem is - Isuru

2 Answers

1
votes

This would be very hard to do, because the code has to be compiled. I would suggest you create an updater inside your application and use something like Jenkins. Jenkins can build your application after every commit on a repository like github and then you can add logic to your software to pull the new binary (.exe) and install it as an update. Even better would be a library (.dll), then there would be no need for an installer. I hope I sent you in the right direction.

You'd do something like this:

  1. Add your code to a repository system with a build server.

For example Github and Jenkins

  1. Add an autoupdater function in your code

For example with the .NET Compact Framework

0
votes

The way I solved this problem was by putting the new functions inside a dll file. And add it as a reference in the application. Finally I wrote an update function which replaces the current dll file if there's a new version available in the provided FTP server path. This way I didn't have to override the exe file and therefore it was not needed to worry about the checksum anymore.