business maps/validations/ notDuplicate validation on UI10 field - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: business maps/validations/ notDuplicate validation on UI10 field (/showthread.php?tid=1934) |
business maps/validations/ notDuplicate validation on UI10 field - Svemar - 08-26-2020 Hello, I am trying to implement the map to prevent saving the product witch already exist for the the vendor. So I want to check that there is no saved product with particular vendor_part_no AND particular Vendor name. I tried the following map, but it does not allow to save product whit the same the vendor_part_no BUT different vendor. Could you please guide me? <map> <originmodule> <originname>Products</originname> </originmodule> <fields> <field> <fieldname>vendor_part_no</fieldname> <validations> <validation> <rule>notDuplicate</rule> </validation> </validations> </field> <field> <fieldname>vendor_id</fieldname> <validations> <validation> <rule>notDuplicate</rule> </validation> </validations> </field> </fields> </map> RE: business maps/validations/ notDuplicate validation on UI10 field - joebordes - 08-26-2020 Hi notDuplicate accepts a list of other fields that you want to combine together to validate them all at once instead of separately as your map above does. Try like this: Code: <map> and let us know how it goes. RE: business maps/validations/ notDuplicate validation on UI10 field - joebordes - 08-26-2020 I added this to the documentation. RE: business maps/validations/ notDuplicate validation on UI10 field - Svemar - 08-27-2020 Hi Joe, No, tis does not work. Maybe because form contains not a vendor_id value but vendor name (ui10field)? Marijus RE: business maps/validations/ notDuplicate validation on UI10 field - joebordes - 08-27-2020 you are correct, it constructs the query incorrectly for uitype 10 fields, I will fix that asap thanks! RE: business maps/validations/ notDuplicate validation on UI10 field - joebordes - 08-27-2020 this should be fixed, please update, give it a try and let me know RE: business maps/validations/ notDuplicate validation on UI10 field - Svemar - 09-22-2020 (08-27-2020, 10:16 PM)joebordes Wrote: this should be fixed, please update, give it a try and let me know Hi, Yes, thanks now this works. Regards Marijus |