Automate Deployment of Plugin

Posted:
Wed Nov 24, 2021 11:34 am
by SBarnes
I am working on a plugin where it would need to do the following things listed below but I am not sure if automating it through code from the standpoint of all I want a user to have to do is import the plugin, enable the plugin and restart Jiwa is possible, are these steps possible through code how could you do this?
- Create a database table
- Register a form
- Possibly register a business logic object
- Possibly register a Jiwa collection object
- Add menu items to the menu
Re: Automate Deployment of Plugin 

Posted:
Wed Nov 24, 2021 12:01 pm
by Mike.Sheen
It's all possible, but there are some things to consider.
Create a database table
I don't think the normal SQL users have schema permissions required to do this - so you may have to prompt for credentials of a SQL user which has permissions to create a table and then create a connection with those credentials and then grant permissions to the appropriate SQL users that Jiwa users use.
Register a form
The manager has a property, Forms - which is a list maintenance of type JiwaFinancials.Jiwa.JiwaApplication.Forms.Form - add to that then call the Forms.Save() method.
Possibly register a business logic object
As above, but the property is BusinessLogicCollection which is a list maintenance of type JiwaFinancials.Jiwa.JiwaApplication.BusinessLogic.BusinessLogic.
Add menu items to the menu
Read a menu and modify it with the JiwaFinancials.Jiwa.JiwaApplication.Menu.Menu business logic. It's a normal maintenance business logic type and so you can read a menu with a given RecID or Find by name or Description. Once read, manipulate the menu items in the MenuItems property and then call Save().