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.

88 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
122 views

JSForce describeGlobal isn't working when the community has an added URL

I have to be able to get all objects on my salesforce community and whenever i utilize the jsforce library to get the connection by using this method "jsforce.Connection" let conn = new jsforce....
JPG's user avatar
  • 243
4 votes
0 answers
1k 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 ...
Edmondo's user avatar
  • 1,702
4 votes
0 answers
228 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 ...
Teodora's user avatar
  • 445
4 votes
0 answers
3k 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. ...
Pasan Eeriyagama's user avatar
4 votes
1 answer
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: ...
Mossi's user avatar
  • 3,906
3 votes
0 answers
610 views

How to check for/retrieve record-specific error message, e.g. by errors added through sObject.addError or validation rule?

I'm wondering about the documentation for the sObject class (API 50). It clearly states this for hasErrors(): Returns true if an SObject instance has associated errors. The error message can be ...
Christoph's user avatar
  • 1,002
3 votes
0 answers
99 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 ...
Patlatus's user avatar
  • 16.1k
3 votes
1 answer
99 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. ...
Bart Juriewicz's user avatar
2 votes
0 answers
93 views

Package version creation failed Invalid type: EntitySubscription

I am getting the below error when I am trying to create a patch version. Package version creation failed with an unknown error. Invalid type: EntitySubscription. This Sobject is available in the ...
Saurabh's user avatar
  • 27
2 votes
0 answers
1k views

Apex: Copy all populated values from one SObject record to another

I like the way JavaScript lets you easily overlay two objects, retaining the properties of both: let obj1 = {name: 'Foo', quantity: 3}; let obj2 = {name: 'Bar', description: 'A very nice bar'}; // ...
Matthew Souther's user avatar
2 votes
1 answer
185 views

Runtime error when Converting sObject to Account (typecasting)

I'm working on a SOAP integration (.NET C#) to Salesforce and I am facing a problem when I try to get results from Salesforce. To do this I'm using the next example code of the Salesforce walkthrough:...
CrSalesForce's user avatar
2 votes
1 answer
153 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 ...
BlondeSwan's user avatar
  • 1,078
2 votes
0 answers
436 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 ...
Bigears's user avatar
  • 1,091
2 votes
0 answers
998 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 ...
raffian's user avatar
  • 123
2 votes
1 answer
1k 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 ...
BigHairDev's user avatar
2 votes
0 answers
195 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 ...
sheilak's user avatar
  • 540
2 votes
0 answers
648 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 ...
user1986059's user avatar
2 votes
0 answers
138 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 ...
Liudmila Likhovid's user avatar
2 votes
0 answers
92 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 ...
Mummie560's user avatar
2 votes
0 answers
336 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; ...
blu le temps's user avatar
2 votes
0 answers
34 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 ...
Rui Rocha's user avatar
  • 759
2 votes
0 answers
471 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 ...
brentfamily1's user avatar
2 votes
1 answer
996 views

Querying parent-->Child-->Grand child data using salesforce API

Is it possible to query below data structure using salesforce OOTB API(Rest, Soap or Composite)? Lets assume that from account all objects below have 1:M relationship with their parents There can be ...
RedDevil's user avatar
  • 7,775
1 vote
0 answers
119 views

SystemModStamp and LastModifiedDate contains different date

I have checked and part of my records contains different date in that fields. Systemmodstamp is 9.10 and LastModifiedDate is 5.10. I thought that systemmodstamp is different because of automated ...
gikew's user avatar
  • 11
1 vote
0 answers
116 views

How to change field value of sObject in LWC?

I need to write the equivalent code in LWC . Here a sObject is defined in aura cmp and then it is assigning a value to one of its field which is Source__c. CreateCaseActivity is a sObject. How can i ...
Shashwat Chaturvedi's user avatar
1 vote
0 answers
755 views

Invalid Field for SObject

I have 2 fields that I'd like to use in my VFP. Valores_ativos_e_passivos__c is working fine, but when I try to use Ativos_e_passivos__c I receive the Invalid field for SObject error. What am I ...
Sabrina T.'s user avatar
1 vote
0 answers
912 views

How to detect Permission Set Assignments deletion?

I am currently trying to detect changes in permission set assignments within an arbitrary period; it implies creation and deletion. Where profile and permission set assignment creation is straight ...
Julien St-Pierre Fortin's user avatar
1 vote
0 answers
26 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 ...
Jos Vervoorn's user avatar
1 vote
0 answers
81 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. ...
Mac A.'s user avatar
  • 379
1 vote
0 answers
76 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.
PRANAV BHARDWAJ's user avatar
1 vote
0 answers
248 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 ...
Jaimin Khamar's user avatar
1 vote
0 answers
309 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 ...
Arthlete's user avatar
  • 4,855
1 vote
0 answers
1k 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 ...
Ravi Vadher's user avatar
1 vote
1 answer
429 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>...
d0001's user avatar
  • 518
1 vote
0 answers
34 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 ...
dmachop's user avatar
  • 1,089
1 vote
2 answers
264 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 ...
DKG's user avatar
  • 111
1 vote
0 answers
1k 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 ...
Jolanda Verhoef's user avatar
1 vote
0 answers
430 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-...
Brian M's user avatar
  • 23
1 vote
0 answers
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 ...
Michael Gill's user avatar
  • 2,182
0 votes
0 answers
217 views

Error when querying Salesforce REST API - order object with full query, but works fine with limited results and querying just one field

I'm encountering an issue when performing a REST API query for order object on Salesforce, specifically when using a full query that includes multiple fields. However, the query works perfectly fine ...
Athithya Vidyarth S's user avatar
0 votes
0 answers
54 views

Update sObject from Batch Apex when the sObject's other custom field value is invalid

So we have a situation where we have some custom sObjects that have some custom fields that are picklists. From time to time an Apex batch job runs to update picklists in Custom_Field_1__c. Now we add ...
zaitsman's user avatar
  • 1,890
0 votes
1 answer
74 views

Cannot find field level permissions on standard field

I am having some SOQL queries fail when I include the field "Street" when querying for a Lead. This is the kind of query I'm running and the error message back: SELECT Id, Name, firstName, ...
jerfp's user avatar
  • 111
0 votes
0 answers
83 views

Deployment error on sobject without message

I am pushing Account sobject on save. File is CustomData__c.object, not multiple for each field. It says "Deployed with status SUCCEEDED_PARTIAL, but no error is displayed. They are displayed in ...
Leged's user avatar
  • 1
0 votes
0 answers
185 views

Running Salesforce Code Analyzer for method version 3

I'm trying to run the SalesForce Code Analyzer on the new version 3 to a unique method called deleteQuery and the deleteQuery has a parameter Id here what I'm using: "sfdx scanner:run:dfa --...
Matheus Mello's user avatar
0 votes
0 answers
39 views

Record field is empty after package update

I have custom managed package and created record of sObject(Response__c) from that package with namespace. And after updating package to new version one field(Message__c) became empty. That field is ...
ravipo's user avatar
  • 43
0 votes
0 answers
146 views

Reenable 'Visibility' field on FeedItem

We've been using the 'Visibility' field (the one defined here) on the 'FeedItem' object. These have been removed/changed/hidden somehow -- all of the sudden, we get "No such column 'Visibility' ...
Daniel's user avatar
  • 1
0 votes
0 answers
28 views

Need help figuring out how to build a Questionaire based on objects in Salesforce, display in an Experience Cloud Page with generated URL

I'm trying to wrap my head around something pretty complicated. Users want to dynamically build out a form with Questions and Answers that will display on a Experience Cloud Page. There will be a bank ...
C.Flye's user avatar
  • 23
0 votes
0 answers
237 views

Attachment API returning Status=Not Found, StatusCode=404 from Apex but works from Anonymous window & workbench

I am trying to access Attachment info using /services/data/v56.0/sobjects/Attachment/\<attachment-id\> which works fine from workbench. It also works fine from Anonymous window using URL....
farooq.ind's user avatar
0 votes
1 answer
160 views

Create custom object using Partner wsdl which has a parent ID (SOAP API)

When creating a new record using the partner wsdl SOAP API how do I add the parent id to the generic sObject. We have a parent record of Account__c and child records of Store_Visit__c My attempted ...
Software Developer's user avatar
0 votes
0 answers
590 views

Getting 404 Error when trying to create a Lead object in SalesForce API

I'm sending a POST request from a connected app to try and create a Lead object in my company's dashboard. Here is the URL that I'm using to post: https://${MyOrganization'sBaseURL}.my.salesforce.com/...
Trent's user avatar
  • 1