How to check for duplicate data in a Item Table?

63 views
Skip to first unread message

Aditya Duggal

unread,
Mar 18, 2013, 3:56:09 PM3/18/13
to erpnext-dev...@googlegroups.com
Hi,

I am looking for a code wherein we could check the various custom fields' combination and avoid duplicity. Basically if we have 5 custom fields 1-5 then I would like to check all the items where these all fields are same.

Item Code XXX = Item Code YYY if

Custom Field 1
Custom Field 2
Custom Field 3
Custom Field 4
Custom Field 5

all have same values. Is this kind of a check possible. I need to automatically generate item codes and this is one primary requirement for that kind of a system.

Rushabh Mehta

unread,
Mar 19, 2013, 12:46:47 AM3/19/13
to erpnext-dev...@googlegroups.com
Aditya,

This will need a custom feature. Basically its done adding a unique constraint on the Item table.


For now, just send a support ticket to us with the fields and we will do it from the back end.

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/3RA5HlazOKcJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Aditya Duggal

unread,
Mar 21, 2013, 4:49:34 AM3/21/13
to erpnext-dev...@googlegroups.com
Hi Rushabh,

Thanks for the link, I am working on it. Honestly speaking, I would not be sending a Support Ticket for the same since I know the thing which I want is at least 4k line code and since your plate is already full I don't expect the thing to be resolved any time soon.

I would just request you to kindly help me with things on the forums only and once I am through with things I would be sharing the entire custom script and hope people would be able to benefit from that.

For starter, I would request you to kindly let me know of a way in which I could update a serial number field which I have made in Item Group through a code in custom script of Item.

Basically my code is something like this:

cur_frm.add_fetch('item_group','serial_number','serial_number');

Now once this field is fetched in the item we would be using this field in the item code but my problem is that once the item is generated we would want this field to be updated to the next serial number in the item group so that the next time an item code is created we could have a different serial number.

I hope you are able to understand the things from the sketchy information provided by me.


On Tuesday, March 19, 2013 10:16:47 AM UTC+5:30, rushabh wrote:
Aditya,

This will need a custom feature. Basically its done adding a unique constraint on the Item table.


For now, just send a support ticket to us with the fields and we will do it from the back end.

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 19-Mar-2013, at 1:26 AM, Aditya Duggal <aditya...@gmail.com> wrote:

Hi,

I am looking for a code wherein we could check the various custom fields' combination and avoid duplicity. Basically if we have 5 custom fields 1-5 then I would like to check all the items where these all fields are same.

Item Code XXX = Item Code YYY if

Custom Field 1
Custom Field 2
Custom Field 3
Custom Field 4
Custom Field 5

all have same values. Is this kind of a check possible. I need to automatically generate item codes and this is one primary requirement for that kind of a system.


--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages