22 votes
Accepted

Triggers on ContentObjects

Alright, I spent a couple of days going through it all, and the short answer is: it's complicated. Depending on what you want your triggers to do, you may need to have different triggers on different ...
AvailableName's user avatar
19 votes
Accepted

Is Username Globally Unique?

Salesforce is split across login "domains." Each domain uses its own username index, which means it's entirely possible to create the exact same user on login.salesforce.com, test.salesforce.com, and ...
sfdcfox's user avatar
  • 487k
16 votes

Which standard objects don't support triggers?

Following Standard objects don't support trigger, I have gathered so far as of Spring' 17 release. AcceptedEventRelation AccountContactRelation AccountCleanInfo AccountContactRole AccountFeed ...
Santanu Boral's user avatar
14 votes
Accepted

Can someone please explain what is meant by sObject?

An SObject represents a specific table in the database that you can discretely query. The API Name is what you reference as ending in __c. Standard SObjects have names like Account or Opportunity, ...
Adrian Larson's user avatar
  • 150k
13 votes
Accepted

What is the value of the first and final record id for an object?

Most of what you need to know is covered in What are Salesforce ID's composed of? In short, only the last 9 characters of the ID are incremented from record to record. E.g. 0010a0000000001 to ...
Daniel Ballinger's user avatar
11 votes
Accepted

Search for a field in all objects

SOQL/SOSL won't help you here. You can, however, write a query using the Tooling API like this: SELECT Id,TableEnumOrId FROM CustomField WHERE DeveloperName = 'Owner' The easiest way to do this is ...
sfdcfox's user avatar
  • 487k
9 votes
Accepted

How can I create an Account Note or Contact Note via API that is visible in Salesforce UI?

You have the 'new' Notes functionality configured. See: What’s the Difference Between Notes and the Old Note-Taking Tool? With new Notes, you have to use the ContentNote object, then create a ...
metadaddy's user avatar
  • 16.4k
7 votes
Accepted

Can I rename API names of fields in a change set?

The API names are, in a matter of speaking, the unique Id's for your metadata. If you change the API name in sandbox 1, sandbox 2 has no idea that you did that. So when you move the metadata to ...
Jesse Milburn's user avatar
6 votes

Determine if instance has Multi-Currency Enabled

Another possible way is via UserInfo Class. Boolean multiCurrencyEnabled = UserInfo.isMultiCurrencyOrganization();
Christian Szandor Knapp's user avatar
6 votes
Accepted

Queues, Email Notifications, Standard Controller Extensions. Oh My!

Congratulations. You found one of the ways that StandardController (and StandardSetController) is broken (at least, for now). I've been trying to get a straight answer about why it's as broken as it ...
sfdcfox's user avatar
  • 487k
6 votes
Accepted

What Standard Objects Are Missing System/Audit Fields?

Approach I ran this script to find the standard objects missing each field: for (SObjectType sObjectType : Schema.getGlobalDescribe().values()) { DescribeSObjectResult describe = sObjectType....
Adrian Larson's user avatar
  • 150k
6 votes

How To Deploy Standard Field & Permissions?

There is currently no way to perform this task if you are exclusively using change sets. This is something which will have to be manually done via the point and click interface for every profile / ...
Double A's user avatar
  • 2,123
6 votes

Fire Journey Builder when Contact Object is Updated

The documentation is a little misleading when it states: "The rule does not run when a record that previously met rule criteria is updated". Makes it sound like a record can't qualify again. So for ...
Josh de Blank's user avatar
6 votes

Remove standard objects

You can't delete the definitions of standard objects. If you don't want them to be available to your users under any circumstances, you should remove all object-level permissions ("CRUD") from all ...
David Reed's user avatar
  • 92.6k
6 votes
Accepted

Fields can see in workbench but when i query it says no such column on entity

MediumPhotoUrl field on User was introduced in API v37.0. If your Apex class has api version lower than that, you won't be able to query that field. Solution: Increase the API version of Apex class ...
Pranay Jaiswal's user avatar
6 votes
Accepted

Salesforce opportunity stages

Check out the OpportunityStage object. SELECT MasterLabel, DefaultProbability, ForecastCategory, IsClosed, IsWon FROM OpportunityStage
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

How to match profile name to ant metadata profile name and vice versa?

I think I have finally found the solution. While one of the possible point-and-click way is suggested by @user3375426 to create an outbound changeset and click add Profiles there (I have added here ...
Patlatus's user avatar
  • 16.4k
5 votes
Accepted

Overriding standard object to Visualforce page

If you want to override the List action, you must use a StandardSetController, which you introduce with the recordSetVar attribute. <apex:page standardController="Account" recordSetVar="accounts"&...
Adrian Larson's user avatar
  • 150k
5 votes

Can someone please explain what is meant by sObject?

A common direct use of the SObject class is when writing Apex code that you want to work with various actual types e.g. something that works with Account and Contact and any other standard or custom ...
Keith C's user avatar
  • 136k
5 votes
Accepted

Why is LastModifiedDate not listed as a standard field in the UI?

Its a system generated date that is not listed in the standard field list. You will also notice that Created Date is not listed there. These field still exist. You can confirm by doing a simple ...
Chris Duncombe's user avatar
5 votes
Accepted

Querying for all Standard and Custom Objects

You surely can using Schema.getGlobalDescribe(), as mentioned in the comments. It returns a Map<String, SObjectType>, so you can get a Set<String> objectNames or a List<SObjectType> ...
Adrian Larson's user avatar
  • 150k
5 votes

Is there a way to hide/disable standard Salesforce button clicked

To hide the button This can be done with record types and page layouts Create two record types - one for Leads with stages up to but not including the stage that allows conversion one for Leads in ...
cropredy's user avatar
  • 70.8k
5 votes

Formula to check if an opportunity is closed won

You can check against the IsWon field. AND(IsWon, Date_of_Event__c - CloseDate > 30) You could also check IsClosed if you want to be sure you only fire for Closed/Won records: AND(IsClosed, ...
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

Which standard objects don't support triggers?

Here's a quick script to dynamically get a list of all non-triggerable objects on demand. Run this from Execute Anonymous in the dev console and check the log's debug outputs to find out which ...
Brent Bowers's user avatar
  • 3,094
5 votes

Acces to campaigns in Standard Platform User Profile

Salesforce platform license does not allow to have access of Campaign object. Designed for users who need access to custom apps but not to standard CRM functionality. Users with this user license ...
Mr.Frodo's user avatar
  • 5,804
5 votes

what is the maximum salesforce id length

Salesforce is using 18 character IDs. There are also the shorter 15 char case-sensitive ones. Salesforce recommends the use of the longer one. For more information see the official documentation on ...
coffee_bear's user avatar
5 votes

What is the "Image" object?

Salesforce has introduced Consumer Goods Cloud, a new industry product that enables companies related to consumer goods to optimize revenue growth and maximize ROI with the help of advanced retail ...
Vinay's user avatar
  • 3,205
5 votes
Accepted

How to retrieve object description using REST API/Object tooling/SOQL

You should use Tooling Api, so the endpoint is /services/data/v53.0/tooling/query/, while you used /services/data/v53.0/query/. /services/data/v53.0/tooling/query/?q=SELECT+Description+FROM+...
RubenDG's user avatar
  • 8,402
4 votes

Relationship between Opportunity, OpportunityLineItems(Opportunity Product), PricebookEntry, Product2 & Pricebookentry in Salesforce?

Opportunity Product is a Junction Object between Opportunity and Product2 objects. The API name is OpportunityLineItem. The relationship between Product2 and PriceBookEntry is 1:M(Master Detail) ...
Jarvis's user avatar
  • 2,110

Only top scored, non community-wiki answers of a minimum length are eligible