Questions tagged [sobject]

An sObject represents an object, such as an Account or Campaign. An sObject is the base object for all objects in Apex.

58 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12
votes
1answer
1k views

Bad rightOperand type: got SObjectScriptRow

I just want to know what is SObjectScriptRow! All I can find about it is this question. I'm building an invocable method to be used from a process, where I have one input parameter: a list of an ...
6
votes
1answer
908 views

Unable to read SObject error in Lightning Component when record has been queried from the database

I had encountered the "Unable to read SObject" error when attempting to pass an SObject record from Lightning to an @AuraEnabled Apex method. Based on this question, I first tried setting the "...
5
votes
1answer
1k views

JSON serialize SObject including fields with null values

I've currently got a use case where I would like to JSON serialize an SObject, but include fields with null (blank) values. According to the documentation (https://developer.salesforce.com/docs/atlas....
4
votes
1answer
1k views

recalculateFormulas() causing UnexpectedException: Unable to create/update fields: IsDeleted

When I update my custom Record__c a trigger runs, and it calls recalculateFormulas() on the record. This results in the following error: System.UnexpectedException: Unable to create/update fields: ...
3
votes
1answer
3k views

Invalid Field For SObject Error

I am having issues creating a table of related record for a custom object. I have a custom object 'Equipment Library' with a child custom object 'Equipment Library Item' which in turn had a field ...
3
votes
0answers
75 views

Does List<SObject>.sort method implementation depend on version?

I believe that I have found very interested undocumented bug in Salesforce. I don't see in the documentation saying that List.sort method implementation depends on version, but looks like it does. If ...
3
votes
1answer
85 views

Change sObject field type and deploy using API

In this thread, there is a discussion about modifying a custom sObject's type. When I try to change the field's type in the Salesforce UI, I can see an error message with some references to the code. ...
2
votes
1answer
51 views

Update sObjects in .sfdx/typings

I have a VSCode SFDX Project that we use to develop LWCs, and we recently changed some object names in the Org and now I can't upload anything to our Org. I found that there is a command to refresh ...
2
votes
0answers
401 views

What is the reason behind not being able to make a custom lookup field (looking up Standard Object) a mandatory field?

Not sure why we cannot make a custom lookup field a mandatory field, when the looking up object is a standard SObject. e.g. Product Holder (Custom obj) has Component lookup field looking up Product2. ...
2
votes
0answers
171 views

findDuplicates method - Not returning duplicates which are captured in User Interface

We have a matching rule on Contact which defines a dupe using the following logic: A fuzzy match on the first Name and Last Name and EITHER a fuzzy match on address (using street or postcode) OR a ...
2
votes
1answer
452 views

Which Objects are displayed in PermissionSet Object Settings?

I am a noob with Salesforce, please bare with my question. I am creating an App which enables easy edit/creation of PermissionSets on an ORG. In this process, I am creating a tree view with ...
2
votes
0answers
49 views

Capitalization guidelines for Salesforce objects in managed package application UI

Can anyone suggest guidelines for how to capitalise references to Salesforce objects in a managed package application UI, in particular standard objects like Account, Contact etc.? I've read the ...
2
votes
0answers
477 views

Create Public custom settings via REST API

First, is it possible to create a custom object without using Metadata SOAP API ? As per my reading until now it is not possible. I know for a fact, one can create ApexTrigger using REST API. Since I ...
2
votes
0answers
113 views

Error while parsing object Contract received through Metadata API caused by restrictedPicklist

I retrieve SObjects using retrieve() call from Metadata API and then I'm trying to parse them like described here in comment. The problem occurs while trying to parse standard object Contract. It ...
2
votes
0answers
74 views

Implementing WorkBadge History for Apex/VisualForce

What I would like to accomplish is create a visual force/apex page that show's how many times someone has received a specific work badge on salesforce, such as the "Thank You" badge. It's similar to ...
2
votes
0answers
170 views

sObject insert execution not synchronous

I have a custom object and a controller action that creates a new record of this type. The action then returns a page where the list of objects are displayed. save() { ... insert myObject; ...
2
votes
0answers
31 views

Problem with reports after install

I've recently created a package and I'm facing an unusual problem. Basically, in my development org, this works: String report = String.valueOf([SELECT Id FROM ...
2
votes
0answers
450 views

Invalid sObject type 'DataDotComEntitySetting'

We have Data.com, namespace jigsaw_clean, v 2.16.2 installed and I am encountering an sObject type error when I try to do a simple DML statement in a unit test script. The test method instantiates a ...
1
vote
0answers
14 views

How to truncate CampaignInfluence

CampaignInfluence is consuming a large amount of storage as you can see. Now I've tried to access the object through Workbench etc but no luck. Anyone managed to access the object and do some cleaning ...
1
vote
0answers
30 views

No such column on sobject error occurring on sObject that does have that column

When attempting to update a custom object using SF default API endpoints (/services/data/v43.0/sobjects/MyCustomObject__c/customId__c/4003) I am getting a weird error telling me that a column doesn't ...
1
vote
0answers
35 views

Tell a component to update its' content when a related record is added on the same record page

I have a Lightning Component in a Record Page on Order object, and whenever I add a product (new OrderItem is created) in the order, I'd like to somehow notify the component to update its' content. ...
1
vote
0answers
26 views

How can we add the master record type in the pick list of record type, After creating different record types for account?

When we made different record types of an object, how can we add master record type in pick list also? In pick list option, all custom record type other than master record type are shown.
1
vote
0answers
319 views

How to size database columns for storing Salesforce fields; length or bytelength?

All fields in Salesforce have two lengths; a unicode character length and bytes length; our org uses UTF-8. We're sizing tables/columns in Oracle to accomodate our data from the cloud, my question is ...
1
vote
0answers
113 views

How to create relation between a custom object and Products Line Item ? (Same as Quotes & Quote Line Item)

I was looking for a clean approach where I can apply multiple Products' to a Proposal(Estimate). Would need to be able to add an unknown number of Products to the Proposal(Estimate), along with ...
1
vote
0answers
241 views

RemoteAction: problem returning Map<object, sObject>

I am trying to return a map of object to sobject. However I get a parsing error: VFRemote.js:117 Visualforce Remoting Exception: Error parsing json response: 'Unexpected token {'. Logged ...
1
vote
0answers
769 views

How to clone record with its related list using custom clone list button in Sobject?

Clone record with its related list and update the picklist value i have created one button on record top beside the clone button, when clicked, execute code that would make a new version record with ...
1
vote
1answer
347 views

Visualforce page usingbase standard controller

I have the following Visualforce page and controller: <apex:page standardController="sObject" extensions="ExtensionController"> <div> {!o.Id} </div> <div>...
1
vote
0answers
29 views

Tracking changes to object structures through SOAP API

I am looking to check whether the object that I queried has changed during the previous access. For example, if a new field was added to the Account field, I would like to alert the user that a new ...
1
vote
2answers
143 views

Add canvas app to layout of all object

How can we add connected canvas app to layout of all the objects like account, opportunity, custom objects etc. Currently I have to go to each object, edit layout and add canvas app. Also, If ...
1
vote
0answers
666 views

SObject deployment: Cannot specify a startsWith attribute for this language

I'm trying to deploy an sobject to a new empty environment. I get the following error: Cannot specify a startsWith attribute for this language Both orgs are in English. Any thoughts? Edit: The ...
1
vote
0answers
398 views

ExactTarget Landing Page form - getting a ExactTarget error message if two non-required fields are empty

I have an ExactTarget Landing page form that create a SF Lead when submitted. If every field is filled out(approx 20 fields) everything passes into SF with no issue. The problem is this - of the non-...
1
vote
0answers
2k views

Trying to determine fields I want to set dynamically rather than hardcode - very close / not possible

I am messing around with the dynamic nature of Salesforce. I want to clone Opportunity into a custom object. It's a very easy requirement in itself. What I am trying to do is make if completely ...
0
votes
0answers
72 views

How do Domain Driven Design principles apply to Salesforce development? (was: Is abstracting away SObject model a good practice for Apex Controllers?)

Domain-Driven-Design principles are largely adopted in companies embracing microservice architecture and one of the key ideas is to separate the data model of the persistence layer from the business ...
0
votes
2answers
47 views

LWC Composition for Custom Layout inside a lightning-record-form

I have a SObject with multiple display layouts. Now, I want a way to display a particular layout in my lightning-record-form with different lightning-input-field. I don't wanna attach all the fields ...
0
votes
0answers
11 views

How to query the Lightning Sync Error records

Once Lightning Sync is enabled a new report type can be created, selecting LightningSyncError as the primary object. I would need to query this object in order to get the list of sync errors through ...
0
votes
0answers
41 views

How to store a collection type (set, map, list) on a object?

I have a visual-force page which displays an Apex form with some dynamic number of input text fields that I would like to save on the Opportunity object. Is the easiest way to serialize them as JSON ...
0
votes
1answer
94 views

Not able to find a standard field CompletedDateTime on Task object

We are not able to see CompletedDateTime field on Activity or task object in the production environment but the same is available on Its sandbox. Can someone please suggest if there is any way to ...
0
votes
1answer
32 views

Adding new Fields to Sobject or changing field values dynamically

I have a Sobject Record which is already instantiated and fields are added along with values. sObject sObj = Schema.getGlobalDescribe().get(Name of Object).newSObject() ; sobj.put(...
0
votes
1answer
55 views

Adding Additional Fields to a sObject in Apex, (just for manipulation)

I'm working with some complicated queries, and I need to send over http, the sObject in turn, but I can't make queries with more than 1 level of depth in the SOQL, so I am working with separated ...
0
votes
1answer
41 views

How to find the mandatory fields on Sobjects in RestAPI /describe

I am trying to create an oAuth based app that integrates with salesforce to create the objects from the app. To let users know what all fields that users needs to put in at minimum to create the ...
0
votes
1answer
158 views

Injecting Contact Created in SF on Child BU Journey Builder

I created a Journey in Child BU that uses SF Object Contacts as entry and trigger whenever a Contact Is created. So i tested creating contact and see if it is being accepted under the Child BU JB, but ...
0
votes
2answers
81 views

Collection read only : Unable to add to set

I have to populate a set of Ids with Ids derived from a List<List<sObject>> say searchlist. Below code as I am trying gives me System.Final Exception as Collection is read only and ...
0
votes
1answer
94 views

Not able to update RecurrenceTimeZoneSidKey field on task object

What are the work around the task object in Salesforce, i am trying to update task which is having information in the form of JavaScript object which is mentioned below and when i am trying to update ...
0
votes
1answer
68 views

Making the difference between null and not loaded fields

I have a scenario in which I need to know if a SObject has been loaded with some fields I am about to update. It has been loaded in another code layer, I just get it in input of my method. I am ...
0
votes
0answers
71 views

$Action.Clone not being saved

I'm using the $Action.clone as a simple command button on a VisualForce page. This works for my user account and profile as an admin. However other users can create the interim SObject but get the ...
0
votes
0answers
189 views

Access Custom Owner Fields in VisualForce Email Template

I have a VisualForce email template that retrieves merge data from a custom object (Enquiry__c). The owner is an individual User. I want to access the value of a custom field on the User object. I'...
0
votes
1answer
139 views

Variable not Being Passed from Visualforce/custom controller to Flow

I'm trying to pass a value selected from a SOQL query, from the VF page to a Visual Workflow. The value I am trying to pass is selectedRibbonClauses. I dont get an error message when i try to save the ...
0
votes
2answers
99 views

How to refer parent account while creating an account

I need to display the account name with a slash between account name and the parent account name , if the parent account field is filled. I tried to do that using SObjectType methods. But couldn't do ...
0
votes
0answers
85 views

How to map name value pair in custom fields to object field name and set the value as field value?

I have a custom object X that stores name value pairs. I need to populate a custom object Y which has field names same as the name part of the value. Through visual flow I need to query object X to ...
0
votes
1answer
34 views

retrieve other fields of a SObject after a user has selected an option

I am writing an app that will help calculate the statute of limitations for certain laws. ex. enter a date that a crime happened on and, after choosing a law and appropriate limitation the limitation ...