I'm trying to force an unique field combination in a grid using a unique field trigger. It seems to be working OK, but throwing too many errors. My picture below will explain further:
In the picture below, every Supplier is the same. Every row contains a different Article, except for Row #1 and #4, they contain the same article. The unique field trigger does seem to do it's job, unfortunately the error is thrown 4 times, rather than once.
I have not entered a trigger condition, I only selected a field combination. I hope that's not the problem?
EDIT: I just noticed the unique field trigger triggers even when there are not more than 1 unique field combination.
Hi Gian, thanks for your reply. For test purposes I now deleted all other records, so no unique combination exists. Also, I changed the Unique Field Combination to "Price list" and "Article" (Converted relationship). But now, when I edit and update no error is thrown, even though two rows are the same.
The records should have the same Price List - Article. not Supplier - Article since you changed the combination for the trigger.
Hope this helps.
The trigger seems to be working correctly on "Article Price" Edit page, but not on "Price List" Edit page with grid control.
Hi Gian, unfortunately it is a complex relationship with an intermediate Object. I can't add the trigger to more than 1 object. I have a "Price List" and "Article", these two are combined via a "Article Price" object. Only on this Artical Price object I can create the trigger, because it's the only one that has a link with Price List and Article.
Hi Gian, I have done this. It just doesn't seem to work.
It is working, it just doesn't throw errors for this combination for some reason. When I only select "Article", errors are thrown. When I select "Article" and "Supplier" errors are thrown. But when I select "Article" and "Price list", no errors are thrown, even though duplicates exist.
I am viewing the grid from New Price List page. Current object structure:
Article 1 > M Article Price M > 1 Price List
"Article Price" was created by converting a M > M relationship between Article and Price List.
Can you post your updated screenshot with the price list field in the grid?
Hi Gian, I cannot add the Price List field to the grid because the page I'm viewing the grid from is owned by the Price List object.
Hmm.. But you are saying that you are trying different combinations in the field unique field combination trigger and you said that you are paring price list - articles. Price list should be in the price per article grid in order for the combination to exist.
Yes, I'm trying different combinations, because it didn't work with the combination I was using. I cannot select the price list in the price per article grid because I'm viewing the grid from the New price list page. I cannot select a price list when I'm creating a price list.