Questions tagged [custom-object]

A custom object is an object that is created in an org as opposed to standard objects which are provided by Salesforce. Objects in Salesforce are like tables, so creating a custom object is analogous to creating a table in a relational database.

Filter by
Sorted by
Tagged with
39
votes
1answer
7k views

What are the object and field name suffixes that Salesforce uses? Such as __c and __x

When working with API names for objects and fields they will often have suffixes such as __c and __x. What suffixes are there and what do these API name suffixes indicate?
22
votes
1answer
477 views

Records not being indexed or found with global search

I've come across an issue where Salesforce doesn't seem to be indexing records in a custom object that are created through the REST API. When searching for a record name or external ID no results are ...
20
votes
3answers
15k views

How to create a one-to-one relation between two objects?

Currently I do the following to create a one-to-one relation between two objects: Create a lookup field on the child Create a unique field on the child, and hide this field from all page-layouts ...
19
votes
2answers
3k views

Salesforce Object with _hd suffix?

I am coming across an underscore hd ( _hd ) object in my instance, Ive not noticed this before? I have a custom object called Membershi__c I also see the following to additional objects ...
17
votes
7answers
1k views

Custom Metadata vs. Custom Objects in Managed Package

I worked on Managed packages for nearly 10 years now and never missed Custom Metadata Types. Not before they came and not after they were announced. I didn't come across a single great and technical ...
16
votes
5answers
3k views

What is the downside to using a custom object instead of Contact for people-based data?

I am working on coaching application for a client and the coaches (Contacts in the current system) are portal users who need to save information about their customers. So my plan was to make ...
15
votes
3answers
13k views

Finding if a custom field is editable using Apex code

I am reading the custom fields of a custom object Custom__c and then for each field I am inserting a new value: Public Custom__c custom1 {get;set;} Map<String, Schema.SObjectField> map = ...
15
votes
2answers
17k views

How to retrieve layouts of customs objects belonging to a managed package?

I am trying to retrieve the layouts of all(standard + custom) objects from a test Enterprise org using package.xml manifest files. There are some customs objects that I have created on this org. ...
15
votes
3answers
18k views

Why am I getting a not in package.xml error on custom fields when the custom object is in my package.xml?

Question Doing a deployment with ANT that includes some apex and a custom object. However, when I test deploy I'm getting errors about fields not being in the package.xml. Has something changed ...
13
votes
3answers
4k views

Can you change a junction object's primary relationship?

I added my master-detail relationships in the wrong order and need to change my object's primary relationhip. From the docs: The first master-detail relationship you create on your junction ...
13
votes
1answer
16k views

How do I access the fields of a custom object with a standard controller?

I have a custom object called "Shows." I'm writing a VisualForce page to display some custom data. My code is: <apex:page standardController="Show__c"> <apex:pageBlock id="thePageBlock"...
13
votes
2answers
936 views

Is it possible to get the Standard Field “Name” increased form 80 characters lenght to a greater legth by Salesforce Support?

Is it possible to get the Standard Field "Name" increased form 80 characters lenght to a greater length by Salesforce Support via a case? I know, it's not possible changing this as an Admin. But I ...
12
votes
3answers
3k views

Do child/parent relationship names need to be unique?

Don't all child relationship names on an object need to be unique ? I know they need to be unique if it's a relationship name on a parent to child relationship, but I thought they still needed to be ...
12
votes
2answers
9k views

Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field

I am trying to deploy an update to a custom object. The object and classes associated with it work perfectly in my sandbox, but when I try to deploy, I get the following error: Cannot set ...
12
votes
3answers
1k views

Is CaseComment an Object? If yes, why can't I make a custom lookup referencing it? If no, what it is?

Adding to title: Lookup relationships to CaseComment can not be created; there is no CaseComment entry in the picklist of related objects when defining a custom lookup field.
12
votes
3answers
2k views

Updating an object API name when referenced by code - impossible!

Salesforce makes this process very difficult, and despite advice given by great guys on here I have become incredibly frustrated trying to make this work. I am trying to change a custom objects API ...
12
votes
1answer
5k views

What exactly does the “Allow reports” checkbox do

When creating a custom object you get the chance to "Allow reports", by clicking the checkbox. Can anyone tell me what the checkbox does, exactly? The reason I ask is because I have created some ...
12
votes
2answers
4k views

Can I reset my dev Org?

I'm using my dev org for testing proposes and It's taking my many time to delete objects, data, rules and so on. It is possible to reset this account to original state?
12
votes
2answers
576 views

What is the logic for the automatic creation and update of “standard” report types for custom objects?

Question What is the detailed logic for when a "standard" report type is created/updated for custom objects or custom relationships? Background When custom objects and custom master detail ...
11
votes
1answer
8k views

Why can't I create a master-detail relationship between Product and my custom object?

Trying to create a master-detail relationship between my custom object (detail) and the standard product object (master). Initially it said I couldn't create this because I needed to make sure all ...
10
votes
2answers
5k views

Checkbox on related list

Does anyone know how to add the checkbox column on related list in SF? I have a custom object that I'm try to get checkboxes for related list. Thanks
10
votes
1answer
2k views

Can I create a polymorphic key from a custom object?

I'm creating a custom object that needs to be related to multiple other objects (but only one per record). I.e. via a ParentId field it could be related to a Opportunity, a Contact, an Account, or ...
10
votes
1answer
3k views

Spontaneous Internal Salesforce.com Error - What do I do?

I have a piece of code that has been working for the past few months without problem until recently. I cannot say to the exact day this started happening as this is still in a testing phase and this ...
10
votes
1answer
693 views

<deprecated>false</deprecated> randomly appears in object metadata in managed package. Why?

Sometimes when I commit the latests changes in my managed package to my version control I see those changes in the XML metadata of my custom objects. I heard that Salesforce.com is working on some ...
9
votes
3answers
10k views

How to set default value for NAME field (without using auto-number)?

I have created a new custom object for which I have no use for a record name. Is there any way which I am able to remove name from the list of standard fields? If I am required to name the object, I ...
9
votes
1answer
8k views

How do I insert a custom object?

I have a custom object called Visitor with two custom fields, Name and Identifier. I am trying to add a record with this piece of controller code: public String getResponse() { System.debug('...
9
votes
3answers
8k views

Why Can't I Assign an Approval Step to a Queue for a Custom Object Approval Process?

I know that when running an approval process on Case, you have the option to assign an approval step to a Queue, however, I am now creating an approval process for a custom object, and I don't see the ...
9
votes
4answers
11k views

How to remove attributes before JSON is sent from Custom REST Apex?

I get back JSON like the following: { Id = a0Ef0000002TPKVEA4; Name = a0Ef0000002TPKV; attributes = { type = "Market__c"; url ...
9
votes
2answers
4k views

How do I create a dynamic list in Visualforce

I want to create a view of certain custom fields and objects, with the data for the view computed in a controller with input from SOQL statements from custom objects. The view would consist of several ...
9
votes
1answer
3k views

Fire trigger only if we update custom field

I have an object in Salesforce called File_uploaded__c with some fields like Filename__c, fileSize__c, IsMain, and I want to know if there's a way to implement a trigger that is only fired when we ...
9
votes
3answers
1k views

Generic SObject Getters Return Null for Boolean fields?

Question Am I taking crazy pills are is it unexpected behavior for the generic sObject getters to return null for boolean fields? Background Was troubleshooting a null pointer error and noticed ...
8
votes
4answers
2k views

How to identify look up relations to an object in Salesforce

I have a custom object and I would like to know which all other objects have look up relations to this one? There are many objects available and I cannot go into each and identify which would have ...
8
votes
1answer
552 views

Working with SObjects instead of concrete custom objects (i.e., abstraction in apex)

We have a bunch of custom objects, some of which implement a specific set of custom fields of the same type. (e.g., UniqueID, ExternalID, etc.). I want to be able to write one method that takes and ...
8
votes
3answers
4k views

Field History Tracking - OldValue and NewValue null?

I turned on History tracking for a custom object and set it to work on a particular field. When I updated the field on the custom object, I checked to see if the corresponding __History object had ...
8
votes
1answer
2k views

How to initialize sObject with Relational fields?

In Lightning component we have relational fields (e.g. CustObjA.CustObj__r.Name) which we use in lighthing component. This is on component as, <ui:inputText class="slds-input" value="{!v.Item....
8
votes
2answers
5k views

Force.com migration tool deployment error with a history Tracking enabled custom object

While I was trying to deploy a copy of source code of production to a developer SB, with the Force.com migration tool, encountered the below error for a custom object with enableHistory = true in the ...
8
votes
1answer
2k views

How to redirect Visualforce page automatically

I have custom button which when clicked redirects to VF page, VF page calls some controller, But I want as soon as custom button is clicked it should process to VF page waits for 2 secs and then ...
8
votes
2answers
5k views

Retrieving extended package object descriptors into Eclipse with Force.com IDE plugin

On my development org, I have a certain package installed, containing several custom objects. I have added a few custom fields to some of those objects through the web GUI. I have tried to pull those ...
8
votes
2answers
4k views

How to list down all Standard/Custom Objects and ignore System(Internal) Objects

There's always a requirement to pull ALL standard and custom objects using describe call ignoring all system/internal objects. Is there a way for same? One of option is to reference ProcessInstance ...
8
votes
1answer
356 views

Maximum number of fields in a custom object, considering managed packages?

I am under the impression that a custom SObject can have no more than 500 (or 800) fields in total across all namespaces. From the Salesforce Features and Edition Allocations documentation there is ...
7
votes
2answers
34k views

How do I get the list of fields of sObject

My code is myOutput = SELECT location__c, level__c, group__c, count__c from resource__c public sobject[] data = Database.query(myOutput); myOutput is an user input value, based on this query I ...
7
votes
2answers
8k views

Insert multiple sObjects in single DML call

I have 3 objects. Account, Contact and AccountContact(custom). When I try to insert account and contact using one insert statement as follows, it works perfectly Account a = new Account(...
7
votes
2answers
3k views

When instantiating an custom object, does it get an ID?

I'm having problems with my apex code. I don't know if it's just me, but I can get an ID out of a custom object. So for example if my production org has a Purchase_Quote__c object and in my apex ...
7
votes
1answer
4k views

About the 10 custom objects limitation for community licenses

How is the limit applied? Example scenario: User with community profile has visibility to 10 custom objects, and one of those objects is generated by processing information stored on another ...
7
votes
2answers
610 views

Why does the termination of custom objects look namely this way “__c”?

What does this termination of custom objects mean? Why does it have exactly two underscores? And why is the special termination needed at all?
7
votes
1answer
1k views

Apex object field for reverse lookup

Let's say I have 2 custom objects: Person and Award. Award has a lookup field to Person called Receiver. If I query an object of Award, I know I can do Award.Receiver__r to access fields of the ...
7
votes
1answer
21k views

Create VisualForce input that uses Lookup popup

I have a custom object, Foobar__c, and I would like to create a VisualForce page containing a form in which the user has to select a Foobar__c via the standard Lookup popup for Foobar__c. I would ...
7
votes
1answer
1k views

Not able to alter Organization-Wide Defaults (OWD) via Apex

I am trying to alter Organization-Wide Defaults (OWD) via apex using https://github.com/financialforcedev/apex-mdapi (Apex Wrapper Salesforce Metadata API) tool. I can create custom object with ...
7
votes
1answer
832 views

Mass email a group of contact

I created a custom object named ContactGroup where I can add Contact. A Contact can have many ContactGroup and a ContactGroup can contain many Contact (so this is a n-n relationship). Now I would ...
7
votes
1answer
414 views

Is it possible to add a controlling field to an existing picklist on a custom object as part of a managed package upgrade?

I have an existing picklist on an existing custom object in a managed package. This package is already deployed and installed by users. For the next release of my package, I have added a checkbox ("...

1
2 3 4 5
27