Custom fields duplicate key row issue on upgraded db  Topic is solved

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

Custom fields duplicate key row issue on upgraded db

Postby indikad » Mon Jul 13, 2015 4:55 pm

we are test upgrading a client db from 6.5.13 to jiwa 7 - patch 117 and have a small issue getting existing custom fields to work ( a drop down list to start with )

There are 4 existing custom fields on 6.5.13
1 combo
3 text fields
they all have data on the db)customsettingValues too.

Tried the below and get an error.
Mys Steps:
Created our own custom field plugin - by creating the fields on Debtor master ( 4 or them ) - one being a combo box
added code to populate the combo box
the plugin work well on a blank demo database - tested fine.
imported the plugin to customer database that was upgraded from 6.5.13
get error below
"Cannot insert duplicate key row in object ....."
its refereeing to the field of type combo box. see attached error message.

Obviously the plugin is trying to create a custom field and finds it in the database but... How can I get this resolved please ?

I made sure the legacy plugins disabled - so its not interfering .
Attachments
DavkaPluginErr.png
Cannot insert duplicate key row in object
DavkaPluginErr.png (11.01 KiB) Viewed 2336 times
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Custom fields duplicate key row issue on upgraded db  Topic is solved

Postby Mike.Sheen » Wed Jul 15, 2015 7:37 pm

indikad wrote:Created our own custom field plugin - by creating the fields on Debtor master ( 4 or them ) - one being a combo box
added code to populate the combo box
the plugin work well on a blank demo database - tested fine.
imported the plugin to customer database that was upgraded from 6.5.13
get error below
"Cannot insert duplicate key row in object ....."
its refereeing to the field of type combo box. see attached error message.

Obviously the plugin is trying to create a custom field and finds it in the database but... How can I get this resolved please ?

I made sure the legacy plugins disabled - so its not interfering .


You probably will want to keep the existing values of the custom fields - so you should remove the custom fields in your new plugin which are already in the legacy plugin, then use the move button on the custom fields from the legacy plugin to move that field to your new plugin.

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

Re: Custom fields duplicate key row issue on upgraded db

Postby indikad » Fri Jul 17, 2015 2:35 pm

I will give this a try and post back. the bits I am worried about is the code that I have written for the new plugin.
In any case will give a try to your suggestion first.
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron