Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [duplicate-value]

The tag has no usage guidance.

0
votes
1answer
28 views

i m trying to avoid duplicate product code in opportuinity line item but its not updating

trigger duplicatecode on OpportunityLineItem (before insert) { { Set<String> setProductCode= new Set<String>(); For(OpportunityLineItem nam : trigger.new) { ...
1
vote
1answer
101 views

Converting Set to List creates duplicates of my Sobjects

I am adding manipulated Accounts to a Set multiple times and update it. It fails due to a Duplicate id in list exception. What should be impossible, because the values are coming from a set. After ...
0
votes
1answer
20 views

Can a Random String Generator create duplicate values, if so how to stop it?

I want to know whether this code can create multiple instances of the same random number by any chance? Can i make this specific field to not have same values within salesforce it self? trigger token ...
2
votes
2answers
65 views

Updating Map values returns list exception (row with duplicate Id at index: X)

I have a list of tasks that need to be updated. To avoid duplicates, it first gets converted into a Map<Id, Task> whose values are updated as follows: Map<Id, Task> mapIdTasksToUpdate = ...
0
votes
2answers
36 views

How to build a testdatafactory without error : DUPLICATE_VALUE, duplicate value found: duplicates value on record with id: : []

I an trying to create a testdatafactory which i can use to call in my tesclasses. What I want to achieve is small buildingblocks with which I call another method if a lookupfield needs to be filled. I ...
4
votes
3answers
109 views

Duplicate class objects in a set

I am having 2 instances of a wrapper class holding the same values. Then I add both instances to a Set of that wrapper class and both instances are present in the set. Say this is my code: public ...