Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [salesforce-id]

A Salesforce ID is the primary key field for any object. It is a primitive type in Salesforce. Salesforce Ids come in 15-character and 18-character "case safe" varieties, which are treated as equivalent by all APIs.

Filter by
Sorted by
Tagged with
168 votes
4 answers
67k views

What are Salesforce ID's composed of?

I remember seeing somewhere that IDs are composed of a few pieces. I always have a hard time trying to find that information when I'm looking for it. What I mean by the above is that the various ...
Ryan Elkins's user avatar
  • 7,687
31 votes
1 answer
93k views

Can anybody explain the UNABLE_TO_LOCK_ROW error?

Error Message: Developer script exception from Nicomatic : quotepotential : quotepotential: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with ...
Teja's user avatar
  • 1,422
12 votes
4 answers
4k views

Converting the Salesforce Pod Id to ServerUrl/Name

Given a Salesforce Org Id, how can I determine the name and serverUrl to use with APIs?* For example, given the Org Id 00DE00001234ooT I can get the Pod/Server identifier from the first character ...
Daniel Ballinger's user avatar
43 votes
27 answers
21k views

How can I convert a 15 char Id value into an 18 char Id value?

What is the formula for calculating the additional 3 characters needed to append to a 15 char Id in order to form its equivalent 18 char Id? I have a situation where I need to compare 15 char Ids (...
Yaakov Ellis's user avatar
  • 1,459
14 votes
6 answers
2k views

Converting uppercased 18-digit Id to valid Id

I am currently facing an issue where an external system passes back an 18-digit Id that our platform has previously sent to them. However in the process the capitalization of the Id has been removed - ...
Koen Faro's user avatar
  • 773
12 votes
2 answers
3k views

Creating a link using an 18 character ID

I have an 18 character SFDC ID. I was under the impression that I should be able to create a link to that record using the following pattern: https://<org server>.salesforce.com/<id> For ...
Ryan Elkins's user avatar
  • 7,687
45 votes
1 answer
141k views

How do I build a SOQL query for records in a list of IDs?

Can some one correct my soql? I need to export records in data loader like: WHERE Id IN ('123123123','123123fsdf') But this following query does not work for me: SELECT Id, Syndication_Documents__c ...
sfdc's user avatar
  • 13.7k
17 votes
5 answers
26k views

can we check if a key exists in a map in vf page

is it possible to check for a specific key in a map i.e., whether it exists or not in VISUALFORCE page? Based on this i need to render a pageblocktable.
rani's user avatar
  • 221
3 votes
1 answer
1k views

How to get list of all sobject records modified today in the system?

I need a list of all sobject records that got modified today. this is not just for one object but for all objects in the system. Is there a simpler way to do this?
The Beginner's user avatar
26 votes
2 answers
17k views

Database.SaveResult.getId() returns null

I'm trying to update an account list and I need to get the Ids when the update fails. I use the getId() method but for accounts which fail I get null. It's an update so my account already has an Id. ...
SF_user's user avatar
  • 3,616
16 votes
1 answer
31k views

Get SObject by Id

I have an Id and I want to know if it's possible to get the SObject with this unique ID ? Something like : SObject object = getSObjectById(myId); I didn't find a method allowing that !
SF_user's user avatar
  • 3,616
15 votes
2 answers
35k views

How to Convert 18 char Id to 15 char Id using substring in Apex trigger

I have a trigger where i am assigning ID to a cusotm field like below - D.customfield__c = acc.Id; The ID is coming as 00P28000000EwpjEA0 But i need only 00P28000000Ewpj 15 char. Is there is a way ...
sfdc_to_learn's user avatar
15 votes
1 answer
8k views

Finding a Custom Object Id (01I...) to get the Setup page URL

I'm trying to find a way to get the "Id" for a custom object's setup page. So I'm NOT trying get a record Id. I'm working on a custom visualforce page and I'm setting up a link so that when the user ...
user7702's user avatar
  • 343
11 votes
4 answers
10k views

Is it possible to insert multiple records in Salesforce using cURL at the same time?

I am using cURL to insert data into salesforce. It works with single record but I need to insert multiple records at a time. Is it possible to do so and is it possible via a REST interface?
Vineeth's user avatar
  • 1,076
21 votes
4 answers
7k views

SOQL where clause use 15-character ID?

Can anyone confirm this: in a SOQL Where clause, when comparing an ID field to a 15-character string variable, the comparison works. I didn't expect it to work, but it does and I am surprised. I can'...
David Cheng's user avatar
  • 7,092
18 votes
1 answer
3k views

What are the Salesforce Pod ID to instance mappings?

As per What are Salesforce ID's composed of?, the 4th and 5th character of a Salesforce ID can be used to identify which pod/server the record was created on. Note that due to events like pod ...
Daniel Ballinger's user avatar
14 votes
2 answers
6k views

Are SObject Id's sequential & should they be used for defining batches in a large data retrieval?

Are Salesforce ObjectIds (15/18 char) guaranteed to be sequential, based on create date? In other words, would the following queries return the same sequence of items?: 1. Select Id from Account ...
Yaakov Ellis's user avatar
  • 1,459
13 votes
1 answer
12k views

Populating lookup fields using an external ID

I have an lookup field in my opportunity object which is pointing to a custom object called Code__c. Code__c has an external Id field called Code_Source__c. When creating an opportunity once way of ...
Yash Mehta's user avatar
  • 1,515
12 votes
2 answers
374 views

Any documentation or insight on the "empty id string"?

This answer (from Nathan Pike a Salesforce developer) mentions the idea of an "empty id string" that can be appended to the 3 digit key prefix. I've wanted an ID that matches nothing but is ...
Keith C's user avatar
  • 136k
7 votes
2 answers
24k views

Calling a Apex controller method using JavaScript in VF page

Hi can anybody guide me how to call a method in controller from a VF page.
AnuRaj's user avatar
  • 2,482
6 votes
2 answers
4k views

Issue with using ContactID as subscriber key in Marketing Cloud

We have set up our Sales Cloud - Marketing Cloud integration where Contact ID is used as the subscriber key. What we've noticed is when we have contact ID as the subscriber relationship on our ...
MikeT's user avatar
  • 71
2 votes
1 answer
16k views

How to pass the record id to controller method from LWC

I'm new to Salesforce. How to pass recordId to Apex Method from LWC. I tried no luck. Please help on this. .js import { LightningElement, api, track, wire } from 'lwc'; import { ShowToastEvent } ...
SK2889's user avatar
  • 919
1 vote
1 answer
57 views

related to site and visualforcepages

Hi is it possible to get images from go daddy to visual force pages.if it possible can you explain clearly how the process is.
mahesh's user avatar
  • 171
22 votes
1 answer
28k views

How do I query queue ID in Apex?

How do I query queue ID in Apex? Known parameters: Queue Name Supported object Miscellaneous information: The reason I need queue ID in Apex because my routing logic assigns selected records to a ...
Shumon Saha's user avatar
  • 4,632
15 votes
2 answers
2k views

Does anybody have a good way of mapping a key prefix to an object type?

I want to be able to reliably take an ID and map it to the appropriate object type so I can query the object in question. Before now I've tried using the global decsribe info, looping over the ...
Matt Lacey's user avatar
  • 25.6k
12 votes
3 answers
9k views

How to access and not hardcode the field ID for a custom object? Using Apex, to construct URLs

Lets say you wanna create a new instance of a custom object, lets call this Custom Object Relationship_Detail__c. You are trying to create a link where it takes you to the proper RecordTypeId and it ...
user10009's user avatar
  • 171
9 votes
2 answers
10k views

How to update parentID on Attachments in Salesforce

I need to move Attachments from one SF to another SF, but the final parent object is not in the destination org. So I've created temporary records and plan to update the ParentId of the attachments ...
Chirag Verma's user avatar
9 votes
3 answers
4k views

is of 18 digit ID really case insensitive?

As per documentation(or should i say popular belief ... as i did not find exact documentation link) 18 digits are case insensitive and 15 digit ids are case sensitive. In fact many site blogs says ...
AtulRajguru9's user avatar
  • 9,120
9 votes
1 answer
13k views

Convert Date to milliseconds and milliseconds to Date

I am getting date into JSON as below : date=1382166999 It seems that date has been returned in milliseconds format. Can anyone please suggest the way to convert it into normal date format and vice ...
S.Sharma's user avatar
  • 1,637
8 votes
2 answers
6k views

How to pass a variable to the SOQL where clause?

I am using Salesforce API with C#. In the query that I am writing I am not sure how to pass a parameter to the select statement. My query works when it looks like this: SOQL = "select AuthorId,Name, ...
Alma's user avatar
  • 223
7 votes
1 answer
2k views

What will happen with the Salesforce Pod identifier when there are more than 62 instances?

Currently the pod instance that a record is created on is encoded in the 4 character of the ID, immediately after the key prefix. There are some more details about the Pod identifier in the question ...
Daniel Ballinger's user avatar
7 votes
1 answer
1k views

How do I get the user details when authenticating with OAuth 2.0?

I am using DotNetOpenAuth libraries to implement OAuth 2.0 client side to communicate with SalesForce authorization server. I have finished first two steps of OAuth 2.0 communication that ends with ...
Rastko's user avatar
  • 941
6 votes
2 answers
7k views

Get the ID of a lookup field for Onclick Javascript Button

I am trying to get the ID of a lookup field so I can populate a field on a new record that is created when an Onclick Javascript button is clicked. Basically I need the ID of Birth_Record_c.Dame_c ...
Jennifer's user avatar
  • 179
6 votes
1 answer
9k views

ContentDocumentLink Apex after insert trigger error

Edit: I've built an after insert trigger on ContentDocumentLink. On cropredy's direction, I've bulkified my code and I think improved it generally. It "works" in that it accomplishes my ...
tim shores's user avatar
5 votes
2 answers
6k views

Want to show result after apex batch process is completed

I need to show a alert message after the batch process is completed. For that i have create a static boolean varible in a class and in my batch process finish i am calling this varible and changing ...
AnuRaj's user avatar
  • 2,482
5 votes
1 answer
2k views

Salesforce ID Uniqueness

Are SFDC IDs unique across all of SFDC or can you only assume an ID is unique within a particular org? If an sObject with a particular ID is deleted, could that ID come back again in the same org or ...
Ryan Elkins's user avatar
  • 7,687
5 votes
2 answers
2k views

Get the Object Id

When I have to use an Id which is the best way to put it in a variable? okkay hard coding an ID is bad. Actually i'm doing: user u=[Select id,name from user where name=.. limit 1 ]; post....
Enry's user avatar
  • 3,726
5 votes
1 answer
19k views

getting the owner's name from a SOQL query

Is there a way to get the Name from the OwnerId and Account__r.OwnerId in this query? Select Id, Name, OwnerId,Account__r.Name, Account__r.OwnerId from Sede_BU__C WHERE RecordtypeId = '...
nerti__h's user avatar
5 votes
2 answers
8k views

Getting object name using object ID

My requirement is how to get the object name using Object ID. First 3 places of the record Id depends on Object name. Is there any method to getting the Object name to pass the record Id...?? If ...
sundaramoorthy's user avatar
4 votes
1 answer
271 views

ios - can't insert a new record to remote using smartsync sync up

I'm developing in native iOS. I use SmartSync to sync up local soup to salesforce server. It works fine when updating to remote, when the record to be updated exists in remote. But it doesn't work ...
Steve's user avatar
  • 41
4 votes
1 answer
584 views

Distance Between Salesforce Ids

Does anyone have an idea of the distance between two Salesforce Ids of the same object and instance? Example Account Id: Object-Instance-Reserved-This Distance 001-30-0-0000xxxxx
Steel Reserve 211's user avatar
3 votes
2 answers
3k views

Too many filters - You can only create up to 20 field filters : on a Tabular Report

I am creating a Tabular report on Contacts. Contacts object has got many customized fields as well. I want to list few details of all my contacts (contact of type 'Student') who has got certain fields ...
pravs's user avatar
  • 163
3 votes
3 answers
16k views

How to get ID prefix if you know the object name

I find an object I need in Setup => Create => Objects. I want to get a list of this objects or create a new one. I know, that if I have an existing object, I take first three chars and I'm fine. Here,...
Andrii Muzychuk's user avatar
2 votes
3 answers
12k views

Retrieve object type via id using apex

I am new to Salesforce and trying to figure out the object type using the ID which I see in the URL on the Salesforce page. I found many places describing how to do this with the Apex language, such ...
user1015214's user avatar
2 votes
2 answers
2k views

Add a custom field to multiple objects

I am working on an assignment to populate the data in a developer sandbox with production data. This activity involves me in populating data for over 50 objects. I am planning to create an external Id ...
Balaji Pooruli's user avatar
2 votes
1 answer
2k views

Generate Unique Key Using Trigger

I have already asked a similar question that was initially answered: Generate another ID by encoding the Salesforce ID The suggestion seemed to have fixed the issue but after extensive use and ...
David Dawson's user avatar
  • 1,204
2 votes
1 answer
2k views

Generate another ID by encoding the Salesforce ID

I am trying to generate another ID in Salesforce using a after insert, after update trigger. I wish to use this unique identifier as a URL parameter so it has to contain characters that are url ...
David Dawson's user avatar
  • 1,204
2 votes
1 answer
871 views

How does Salesforce ensure new record IDs for the same object are unique during simultaneous inserts?

Just curious. I know record Ids are not guaranteed to be sequential from the docs. I've also already read this post on what are IDs are composed of. But lets say 2 or more transactions started at the ...
Ken K's user avatar
  • 33
2 votes
1 answer
3k views

ApexPMD eclipse plugin for Salesforce

I have installed ApexPmd plugin for Eclipse(Luna). After installation I can able to "Run ApexPMD" for individual Class. (a) There is an option “Add ApexPMD Nature” providing by the ApexPMD, where it ...
Rock SFDC's user avatar
  • 301
1 vote
0 answers
128 views

Customize Contact to Case association in Email-to-Case functionality

In Email-to-Case functionality Contacts are automatically associated with Cases if matched email address is found in a Contact record. I want this functionality to be customized, so that if Contact's ...
Shreekant Sahu's user avatar