Questions tagged [unique-field]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

ExternalID need to be unique?

I am trying to make a certain field an externalID,and the background job runs, and I never see the checbox get checked. Originally, I was trying to make it both unique an an externalID, however, ...
0
votes
1answer
58 views

Generating a random unique token inside a trigger using a method from a separate class [closed]

I'm using a random string generator code, which I found online. I need to know how I could access this code inside an Apex trigger from an apex class. I have pasted both my trigger and class, but I ...
4
votes
1answer
348 views

Error “The proposed data changes would violate a uniqueness constraint.” Sandbox specific problem?

In my partial data sandbox, I get this error when saving edits to any existing Account. I have enabled the finest debug levels, but the debug log does not give any clue as to why I get this message. ...
0
votes
1answer
31 views

How to accomplish conditional saving when using Unique External IDs?

I have an object with a Unique External ID field. It works fine but have a good amount of already existing records with the same value in the field. And I have a Flow which needs to populate a field ...
0
votes
1answer
88 views

apex:repeat group by/filter by field, show only unique values

So I have an SOQL query which returns an object with these fields: |Product Name|Option|Category| Category could be: A B Options could be: 1 2 3 In my VisualForce page I would like to visualise ...
2
votes
1answer
130 views

How to make an External Id field unique in a managed package?

We need to make couple of existing external Id fields unique in a managed package, But it's not possible to make them unique once released. Unfortunately these have been not made unique by mistake (...
0
votes
2answers
553 views

Salesforce REST upsert for externalId cause DUPLICATE_VALUE error

I send next upsert request to Salesforce: PATCH /services/data/v41.0/sobjects/Task/uuid__c/a22ac4d6-e2c0-4e53-898d-ea1d0c807775 HTTP/1.1 Host: **********.my.salesforce.com Content-Type: application/...
0
votes
1answer
489 views

How can we change existing managed package field to unique?

We have couple of fields across few objects need to be made unique. These have been released a while ago, and we need to modify them to become unique. But when we try to change the Unique - Do not ...
13
votes
1answer
2k views

Is Username Globally Unique?

I was under the impression that the Username field on the User object is globally unique. In other words, even if a value is used in some other instance, that means I cannot create a User record with ...
0
votes
2answers
681 views

How to determine the value is unique

I have a formula field to display after concatenate the three different fields value. formula shown below: TEXT(Account_Code__c) & "-" & TEXT(Account_Code2__c) & "-" & TEXT(...
4
votes
2answers
798 views

Case Sensitivity during Field Creation

I noticed something odd in the way Uniqueness is worded when creating a new field. The two radio buttons are worded as: Treat "ABC" and "abc" as duplicate values (case insensitive) Treat "ABC" and "...
8
votes
2answers
542 views

How to create SQL like composite key

I have an object in which there are two fields i.e Phone no. & email. The combination of these fields should be unique Right now I can create just one unique field But I want their composite to ...
1
vote
0answers
80 views

How to check the uniqueness of a field

I need to check persEmail field whether it is used by another person account or not . When i tried to make it unique by checking the checkbox inside the field , it throws error like "Error: Duplicate ...
0
votes
1answer
251 views

Make picklist unique for a value - Configuration only

I have a picklist on a custom object with values A,B and C. I want only one record of the object with the value of the picklist = C. It is perfectly fine if the other records have the value A or B ...
0
votes
0answers
51 views

SOQL query to get greatest value from unique ID or Custom Setting

trying to figure out the best way to increment a uniqueID value by 1 when leads are inserted into our org. Our externally required uniqueID is formatted as follows XX-YYYYY, where XX has values of "...
3
votes
1answer
1k views

What happens if I make an existing custom field Unique and there are already duplicate values?

If I have an existing custom field where there are some duplicate values across records, but which should ideally be a unique key, is it possible to make it unique? If so, what happens to the existing ...
2
votes
1answer
4k views

Null or Empty value are allowed in Unique and External ID text field

I have created a text field in a custom object, and checked the option for External ID and Unique only but not the Required option. i want know if this text field will allow a NULL or Empty value ? ...
2
votes
1answer
41 views

Auto-detection of duplicates in import. To avoid multiple imports

Say I have three Unique(External ID) Fields (Email, Phone, Mobile) But in my file, I do not have values for all three fields for all the rows. But I have atleast value for any one of the field. In ...
1
vote
1answer
2k views

Having a field linkable like the object name

Basically, on the Account page, I've a related list called 'Rate', which has a field called 'Rate Group' You can click on Rate Group to go to the Rate Group page, but I was wondering if I could make ...
3
votes
1answer
968 views

How to create a trigger that checks a field from the object is fired from

Hello and thanks in advanced. -Background- I have a custom object for files, one of the files recorded in this object needs to be the primary file, but only one. -Approach- Create a trigger that ...
3
votes
1answer
358 views

Changing a Case Insensitive field in Managed Package

I have a "Dupe Detector" field in a couple of objects that is Unique (Case Insensitive). It is a Text(255) whose value is updated by a Workflow Field Update. We have recently had the problem that ...