CoreBOSBB

Full Version: business maps/validations/ notDuplicate validation on UI10 field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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>
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>
<originmodule>
<originname>Products</originname>
</originmodule>
<fields>
<field>
<fieldname>vendor_part_no</fieldname>
<validations>
<validation>
          <rule>notDuplicate</rule>
          <restrictions>
          <restriction>vendor_id</restriction>
          </restrictions>
 </validation>
</validations>
</field>
</fields>
</map>

and let us know how it goes.
I added this to the documentation.
Hi Joe,
No, tis does not work. Maybe because form contains not a vendor_id value but vendor name (ui10field)?
Marijus
you are correct, it constructs the query incorrectly for uitype 10 fields, I will fix that asap

thanks!
this should be fixed, please update, give it a try and let me know
(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