Error occured applying the Custom XML definition  Topic is solved

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

Error occured applying the Custom XML definition

Postby neil.interactit » Tue May 05, 2015 3:57 pm

Sorry, another one happening on site that I cannot reproduce locally ...

image002.jpg
image002.jpg (16.12 KiB) Viewed 18014 times


My guess is the XML definition is in the application folder on site?

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Error occured applying the Custom XML definition  Topic is solved

Postby Scott.Pearce » Tue May 05, 2015 4:24 pm

When a user right clicks on any grid in Jiwa, they can choose to "Use custom columns" for that grid. This means that the user can move columns around, hide or un-hide columns, change the size of columns, rename columns, etc. and these adjustments will be remembered for that user. When they make such changes, and "Use custom columns" is enabled for that grid, then an xml definition for the grid layout is generated and saved to the database. Such custom layouts can be found in the table SY_UserProfile with an IDKey of "CustomXML" on a per user basis.

I suspect that, for whatever reason, the custom xml definition string for that user, for a grid on whatever form they are attempting to load, has become corrupt/invalid. Jiwa is therefore giving an error and falling back to the standard layout for that grid.

To fix, delete SY_UserProfile entries for that user:

Code: Select all
DELETE FROM SY_UserProfile WHERE UserID = (SELECT TOP 1 StaffID FROM HR_Staff WHERE Username = 'Fred')


Of course, you should replace 'Fred' with the username of the user suffering from the issue. The above will delete *ALL* user profile settings for poor old Fred, so maybe we should be a little more targeted:

Code: Select all
DELETE FROM SY_UserProfile WHERE UserID = (SELECT TOP 1 StaffID FROM HR_Staff WHERE Username = 'Fred') AND IDKey = 'CustomXML'


Above will delete all custom grid information for user Fred. We could still be a little nicer:

Code: Select all
DELETE FROM SY_UserProfile WHERE UserID = (SELECT TOP 1 StaffID FROM HR_Staff WHERE Username = 'Fred') AND IDKey = 'CustomXML' AND Section = 'JiwaFinancials.Jiwa.JiwaPluginMaintenanceUI.frmMain.grdModules.Default'


The above statement only targets custom grid information for user fred, for a particular grid.

Hope this helps!
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Error occured applying the Custom XML definition

Postby neil.interactit » Tue May 05, 2015 5:04 pm

Thanks Scott.

Oh how I wish I had access to the client's live database ... I have bundled up a script with some easy parameters for them to run.

Thanks again,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests