Page 1 of 2

New tab in General Ledger Categories

PostPosted: Thu Oct 18, 2018 4:09 pm
by DannyC
Hi,

I'm using the nice functionality in Form Custom Tabs to write my own grid so the user can edit the data in a table GL_Segments.
I have my own stored proc which returns the schema and grid - it displays as expected in SQL query window.

When I add it to the General Ledger Categories, nothing appears, yet when I add it to Inventory Maintenance (just as a test) the new tab appears. Is there something special about the tab control in GL Categories which prevents a new tab from getting added?

Also if I am able to get the grid to display, is it read only or editable?

Version 7.0.157 for now, but client is soon to upgrade to 7.0.175.

EDIT: If the above isnt possible, I've been able to create a new plugin which creates a new form. Unfortunately it is read only. Is there a way to make it editable?
Code: Select all
public class GLSegmentsForm : JiwaFinancials.Jiwa.JiwaApplication.NavigationListUI.NavigationList
{
   public GLSegmentsForm()
   {
      base.StoredProcName = "Attkey_usp_GLSegments";
      base.Text = "GL Segments";

   }
   
   public override void Start()
   {
      base.Start();
   }
   
}

Re: New tab in General Ledger Categories

PostPosted: Fri Oct 19, 2018 9:09 am
by Scott.Pearce
It appears as though custom form tabs only work on "JiwaApplication.Maintenance.UserInterface" forms.

Perhaps look at viewtopic.php?f=27&t=498 for creating your own form and populating it.

Re: New tab in General Ledger Categories

PostPosted: Fri Oct 19, 2018 5:38 pm
by DannyC
Thanks Scott.
Based on that older topic, I have developed the attached plugin. It is nearly there but I'm just having trouble on one line of code (until that's fixed up, then it'll be another line of code!)
Code: Select all
base.OnRead();

Object reference not set to an instance of an object.

I've added the new form to Forms, then add to Menu maintenance.

Error occurs when launching the form.

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 8:48 am
by Scott.Pearce
There is no SQL script attached to the plugin that adds the form entry - how do I add the form?

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:11 am
by DannyC
Scott.Pearce wrote:There is no SQL script attached to the plugin that adds the form entry - how do I add the form?

System Settings -> Forrms

New line, form type=plugin.
Locate the plugin name and class name.
Save.

Then menu maintenance, locate the new form & add it into the menu.

PS. I only know how to add in a form via the GUI. Dont' know how to create the SQL to add it in!

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:26 am
by Scott.Pearce
OK , got it.

Now, what's the problem you are having exactly? The plugin compiles for me and the form loads up OK when I double click on it from the menu.

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:37 am
by DannyC
Scott.Pearce wrote:Now, what's the problem you are having exactly? The plugin compiles for me and the form loads up OK when I double click on it from the menu.

Bugger. It errors when I load the form as per above. Compiles OK.

Running the code via Visual Studio shows that on the the line
base.OnRead() it errors with Object reference not set to an instance of an object.

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:47 am
by Scott.Pearce
You're loading it in a 7.0.157.0 database right?

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:56 am
by DannyC
I am developing in 7.0.175, but it will be installed live in a 7.0.157 database.
Based on your question, I guess it makes a difference?

Re: New tab in General Ledger Categories

PostPosted: Tue Oct 23, 2018 11:57 am
by Scott.Pearce
Might do. I tested in a 7.0.157.0 demo database.