Jiwa 7.0.186 Inventory Category Lookup Custom Field  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Jiwa 7.0.186 Inventory Category Lookup Custom Field

Postby nsbandara » Sat Sep 23, 2017 2:10 am

Hi,

I'm working on a plugin for Jiwa 7.0.186 that require lookup custom field for inventory category. Before executing custom field button click event Jiwa throws an error (screen snap attached). Is this a known bug in Jiwa 7.0.186 ?
Attachments
custom_field_error.JPG
Error message screen snap
custom_field_error.JPG (63.13 KiB) Viewed 915 times
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11

Re: Jiwa 7.0.186 Inventory Category Lookup Custom Field

Postby Mike.Sheen » Sat Sep 23, 2017 12:46 pm

It works ok for me in 7.0.187 - and I've looked at the changes made since 7.0.186 and cannot see any changes related to this aspect of the software.

To test this, I created a new plugin and on the custom fields tab of plugin maintenance added a custom field of type lookup to the Inventory Category 1.

Then in my, code I added a messagebox display to the ButtonClicked method of the LineCustomFieldPlugin class:

Code: Select all
#region "LineCustomFieldPlugin"
public class LineCustomFieldPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldPlugin
{
    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ReadData(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ButtonClicked(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
      System.Windows.Forms.MessageBox.Show("test", "test");
    }
}
#endregion


When I load the Inventory Category 1 list maintenance form, the column displays and when I click the button to the right of the custom field the messagebox displays as expected.

Maybe there is there something inside your ButtonClicked code causing this.

If you put the following line as the first line of the ButtonClicked method, you'll be able to debug the code:
Code: Select all
System.Diagnostics.Debugger.Launch();


Mike
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa 7.0.186 Inventory Category Lookup Custom Field

Postby nsbandara » Sun Sep 24, 2017 3:53 pm

I retested the plugin and and it seems button click code execution failing only for few rows. For category 1 custom field, error appear for rows 2, 4, 5. For category 2 error appear for row 1, 2, 5 .... It seems plugin code execution fails in a random pattern for each category.

I've attached custom field plugin and screen snap taken while testing lookup custom field for category 1.
Attachments
lookup-bug.JPG
screen snaps
Plugin Test Category Custom Field Plugin.xml
Test Category Custom Field Plugin
(31.07 KiB) Downloaded 66 times
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11

Re: Jiwa 7.0.186 Inventory Category Lookup Custom Field  Topic is solved

Postby Mike.Sheen » Sun Sep 24, 2017 4:38 pm

Thanks for the detailed steps to reproduce!

Confirmed this a bug: DEV-6269 - Fixed now in 7.00.188.00 which will be out in a day or two.

The problem cause (as detailed in DEV-6269) is categories where the ID has trailing spaces. Demo data has some categories which have trailing spaces because they were created 22 years ago - it's possible some customer databases may have the issue also, but I think it would be unlikely.

Anyway, it's now fixed.

Mike
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 10 guests

cron