Jump to content

how to prevent duplicates items on portal ?


This topic is 3022 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello , i have a invoice solution and i want to prevent duplicate the items products on the same invoice portal. 

for example if i have a product called " 2525 " and then im trying to add the same "2525" shows me a custom dialog to stop .

i use global fields with a button script to add items to the portal .

please let me know how to resolve this, I've been trying many ways with no luck 

thank you 



Link to comment
Share on other sites

You should try to leverage the field level validation settings to handle this condition.

If you have built a proper invoicing solution then you should have an invoice line items table that knits together invoice id, product ids, quantities and the like.

the invoice line items table is the right place to put the unique, validate always, and don't allow user to override.validation.

I would create an auto enter calculation that concatenates the invoice id and the product id and drop the validation on that.

This method means that anywhere the invoice line item::product id field is expressed on a layout it will be validated if the value is changed.

Another method that not safe for your data because its tied to the UI is to use an onObjectValidate script trigger on the layout object you want to control.

Because the OnObjectValidate script trigger is a PRE event trigger you can cancel the event that triggers the trigger by returning False with the Exit script step i.e. Exit[False]


Edited by Kris M
Link to comment
Share on other sites

  • 5 weeks later...

This topic is 3022 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.