Programmatically Forms and Menus  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Programmatically Forms and Menus

Postby SBarnes » Wed Jul 21, 2021 2:20 pm

How can you programmatically check for the presence of a menu item and for a form and added them if they are not present?

What i am trying to do is simplify/automate the deployment of a plugin.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Programmatically Forms and Menus  Topic is solved

Postby Mike.Sheen » Tue Jul 27, 2021 5:59 pm

SBarnes wrote:How can you programmatically check for the presence of a menu item and for a form and added them if they are not present?

What i am trying to do is simplify/automate the deployment of a plugin.


For a form, you can use the Manager.Forms collection - which is a list maintenance of the Form type - so you can look for the form in there, if not present add what you want and then Save it - and then invoke the Read method so the Manager has it's collection refreshed.

For menus - use the menu business logic - that's a normal maintenance business logic - so you will need to read one for a given RecID and then you can look for the menu item you want and add it if not present and save it.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests