Questions tagged [object]

Referring to an instance in object orientated programming, but within force.com more likely refering to an entity or sObject.

Filter by
Sorted by
Tagged with
8 votes
2 answers
4k views

The length of the first and last names

There is a Name field of type Name in Contact object. It consists of FirstName and LastName. I can query those two fields using Apex. Even though I cannot find any proofs in Object Manager of that, I ...
oobarbazanoo's user avatar
6 votes
1 answer
1k views

Are object Id's globally unique across an organization?

Is it safe to say that an ID for an object in Salesforce is guaranteed to be unique across all objects for an organization? I ask this since id's for objects are prefixed with the keyPrefix value ...
contactmatt's user avatar
  • 1,069
6 votes
2 answers
2k views

In Apex, can I detect if an Object is a Map, regardless of parameterized types?

When I declare a Map, I need to give the types, e.g.: Map<Id, SObject> sObjectByIdMap = new Map<Id, SObject>(); We can assign map to generic values as Objects: Object value = ...
Brian Kessler's user avatar
5 votes
1 answer
859 views

Must I cast a JSON deserialization into an object?

The Apex Developer Guide discusses the deserialize(jsonString, apexType) method of the JSON Class here, with the given example: Decimal n = (Decimal)JSON.deserialize('100.1', Decimal.class); System....
Gabriel Rivera's user avatar
5 votes
1 answer
165 views

Creating a Managed Package with Light Application objects

When developing a Managed Package, should I be careful when designing and creating objects in order to try and make them Light Application objects if that is possible? Will the end users of the ...
smukov's user avatar
  • 5,553
5 votes
3 answers
6k views

Getting a type of the generic object

How to get a type of the generic object? I have a method that gets as parameter some object. It can be realy everything. In my example it is a list of strings. But it can be a map or set or some other ...
Sergej Utko's user avatar
4 votes
2 answers
7k views

Can someone please explain what is meant by sObject?

I am very new to the Apex programming first.And I know about Standard & Custom objects. And also the the custom objects have an extension of '__c'. I observed in the programming lot of reference ...
Robert Thomas's user avatar
4 votes
1 answer
8k views

How do I count objects available in a Salesforce organization?

I need to count the total number of custom objects available in a Salesforce organization. Is there a way to accomplish this?
ookkk's user avatar
  • 43
4 votes
3 answers
5k views

Can I Mass Modify Object Settings > Tab Settings for All Profiles? (Default On/Default Off/Hidden)

I am in the process of my first Salesforce deployment to Production (my company has been working with an implementation team for 7 months or so, and we are going live on Monday). We had some security ...
Morgan Marchese's user avatar
4 votes
1 answer
12k views

apex : convert object to a list

I have an object with value (s1,s2,s3,s4) (this is the value I get during System.debug). Now I want to convert this values to list of strings, i.e ['s1','s2','s3','s4']. How can I do that? I tried, ...
Akash Jain's user avatar
4 votes
2 answers
663 views

Create Instance of Outer Class When Inner Class Shadows Name?

So I have a class (B1) and an inner class (B1 again) in another class (A1). public class A1 { public A1() { //constructor B1 obj = new B1(); } public class B1 { public B1(...
Aditya Vijay's user avatar
  • 1,292
4 votes
1 answer
6k views

How Custom Iterators with Iterable Work

I was reading the topic of using iterator and iterabel Interface - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_iterable.htm It says : If you do not want ...
SfdcBat's user avatar
  • 4,791
4 votes
1 answer
1k views

What is the "Image" object?

While browsing the Object Manager I found the "Image" object. However, I couldn't find any documentation for it and it's not mentioned in the list of standard objects. What is it good for? Where is it ...
adius's user avatar
  • 159
4 votes
1 answer
2k views

Easy way to tell which objects will utilize IsDeleted flag?

It seems most objects, when deleted, will get their record updated with IsDeleted = true while they stay in the recycle bin until they're purged. However, we have found some objects just get ...
Kris Goncalves's user avatar
4 votes
1 answer
91 views

Showing fields depending on parent object

On my opportunity object I have a picklist called "Industry" which has two values: Bldg, Terr. I have a custom related list on opportunity which has fields FieldA, FieldB and FieldC. When the user ...
Lily's user avatar
  • 1,365
3 votes
2 answers
2k views

what is the use of data type in salesforce custom object?

what is the use of data type in salesforce custom object? here is the snapshot
RaviKant's user avatar
  • 498
3 votes
2 answers
3k views

Is it possible to dynamically set properties of an `Object` using Apex?

Background I would like to be able to dynamically set properties of an Object (not SObject). Given this class: public class Invoice { public String Ref { get; set; } } I would like to be able ...
Robs's user avatar
  • 9,336
3 votes
3 answers
2k views

Apex equivalent to associative array?

I have the following list definition in my Apex controller: List<Object> mylist = new List<Object>(); And I would like to do something like: mylist.add({ key : objKey, label : ...
thiout_p's user avatar
  • 175
3 votes
1 answer
347 views

Reactive array of objects and "Use Lightning Web Security for Lightning Web Components"

I have a component that iterates through a property that is an array of objects. <template> <template for:each={widgets} for:item="widget"> <p key="widget.name"...
nstuyvesant's user avatar
3 votes
1 answer
11k views

Apex cast List<Object> into List<SObject>

My method returns a list of Object. I wanted to add that to a list of specific SObject. List<Account> accList = new List<Account>(); List<Object> objList = new List<Object>(...
sfdeveloper21's user avatar
3 votes
1 answer
315 views

Methods inherited from Object class

The Apex includes a system class named Object which serves as the foundation (superclass) for all standard and custom types. Questions Which methods does the Object class contain, and which ones can ...
Piotr Gajek's user avatar
  • 2,625
3 votes
1 answer
215 views

Bug or feature: why SObject[] is instance of SObject?

Run this in Execute Anonymous system.debug( new SObject[]{} instanceof SObject ); "compileProblem": "Operation instanceof is always false since an instance of List is never an ...
Uwe Heim's user avatar
  • 28.4k
3 votes
2 answers
315 views

How to deserialize object with nested query in a simply way

I have a JSON of object with nested query and I do not want to use JSON.deserializeUntyped and map values manually. Is there any easy way to do it? For example: Sobject object = (Sobject) JSON....
Ferhat Özsavran's user avatar
3 votes
1 answer
4k views

Hide custom object for multiple profiles

How to hide custom object for multiple profiles? Direct way to do this is go to profile > click edit and un-check object access (read/create/edit/delete/view all/Modify all) and that object won't be ...
Dave's user avatar
  • 507
3 votes
1 answer
4k views

Has anyone been able to create an automation through SSJS yet?

I've created a server-side JavaScript activity to create an automation, which is throwing an error: An error has occurred: {"message":"An error occurred when attempting to evaluate a CreateObject ...
Michael's user avatar
  • 127
3 votes
1 answer
1k views

How can I get a list of existing cross-object references without hitting the limit?

I am auditing our org - I'm aware that we're close to the cross-object reference limit on OppLineItem and Asset because we've hit it before, but have been able to rationalise various rules, formulas ...
Ben Duffy's user avatar
3 votes
1 answer
1k views

Editing default custom object home screen

I would like to add a custom button (URL to Flow) to my default home page for my custom object. Currently, I have a default "New" button to create a new record (see attached screen shot). I'm wanting ...
motionid's user avatar
3 votes
0 answers
1k views

Callback not called on Continuation Object

I am trying to invoke SOAP service using continuation. While I am able to successfully hit the service, my callback function is not called. Please help me know if there is any issue with it. Thanks ...
Deep Singhal's user avatar
2 votes
3 answers
1k views

Public Permissions vs Profile Permissions for Account

I have Account Object With Public Read/Write Sharing setting. There is one Profile(P1)with Read Access for Account Object. When I create a record, the User of Profile P1 cannot Edit the record, even ...
dem's user avatar
  • 225
2 votes
1 answer
8k views

How to Create an Apex class that returns Account objects

public class AccountUtils { public static void accountByState(){ List<Account> myAccounts = [SELECT Id, Name FROM Account]; } } Why my code doesn't complete the challenge ...
Ryan Ren's user avatar
2 votes
3 answers
485 views

DX packaging with feature standard object?

So this is a weird scenario that I can't seem to find answers for. My team wants to push for the Salesforce DX Unlocked packaging strategy in a few months. First off, its annoying because I have to ...
Andrew Rendon's user avatar
2 votes
1 answer
401 views

Send only udpated fields instead of all the field information

I am integrating an external system with Salesforce and I am sending certain information to the other system from Salesforce once a record is created or updated. I wanted to know if it is possible to ...
Akshay Vasu's user avatar
2 votes
3 answers
134 views

Group and Enterprise Edition Relationship - Salesforce to Salesforce

is it possible to connect regular objects and custom objects from Enterprise edition of Salesforce Sales Cloud to Group edition of Salesforce Sales Cloud through Salesforce to Salesforce functionality?...
Štěpán Víteček's user avatar
2 votes
1 answer
4k views

List has No Rows for Assignment to SObject: Error

I have below trigger code where I get "List has No Rows for Assignment to SObject" Apex trigger: trigger CallVisibility on Compliance_Incident_Transaction_abv__c(before insert, before update) { ...
Testing_SFDC's user avatar
  • 2,940
2 votes
1 answer
721 views

Copy read-only object received from parent component

I want to make a copy of an object received through an @api property from a parent component (actually, there are two parent components): /* eslint-disable no-console */ import { LightningElement, ...
joacoiudica's user avatar
2 votes
1 answer
5k views

Custom Object Nested Query on Standard Object [duplicate]

Is it possible to do a custom object nested query on a standard object? Like so: [SELECT (SELECT Id, Case__c FROM Accounting_Instructions__c WHERE Accounting_Complete__c = TRUE AND Case__r.Id =:...
Olivia's user avatar
  • 3,461
2 votes
2 answers
2k views

Why MailingPostalCode field is not found in Address object

I am new to Salesforce and I want to understand a small thing. My question is: Why MailingPostalCode field is not found in Address object? When I search Contact object from workbench and right click ...
Kamruzzaman's user avatar
2 votes
1 answer
805 views

How to import salesforce standard/custom object and fields into excel sheet

I'm preparing the list of master objects and instead of me going through one by one is there a way I can import object name and fields into excel sheet?
Nick's user avatar
  • 7,012
2 votes
1 answer
3k views

Root cause for "Entity is not org-accessible" for sharing object?

Not able to find Sharing object for custom object Apttus_Proposal__Proposal__Share; giving me error while List<Apttus__APTS_Agreement__share> st = new List<Apttus__APTS_Agreement__c>();
user avatar
2 votes
1 answer
54 views

Article content overview field

I am trying to write a query to retrieve the title, document description and content overview of an article. I am able to find the title and document description on object KnowledgeArticleVersion. But ...
Gops's user avatar
  • 375
2 votes
2 answers
197 views

How do I locate an object definition that does not show under Create - Objects

I have an object in my system that a Trigger and class is using. I need to add a field to that object but I cannot locate where it is defined. I am an admin and can apparently see all objects in my ...
Ohmicron's user avatar
  • 672
2 votes
1 answer
219 views

cant find standard controller that is a custom class from a managed package

I have a VF page that calls a custom object from a managed package as a controller, so, I am seeing something like this: < apex:page standardController="mlk_MarksCustomObject__c" > I cannot find ...
Mark Kogon's user avatar
2 votes
3 answers
2k views

Alternative to schema builder?

We have a data management group who need to review data structure since they are usually tasked with any historical data conversion/cleanup for any apps that move to Salesforce. They asked for ...
curtisk's user avatar
  • 335
2 votes
1 answer
431 views

How to specify an object definition in custom metadata type

I am building an aura lightning:datatable. For flexibility I am specifying each column definition in a custom metadata type record so that when a column needs to be added or removed, have its title ...
MikeA's user avatar
  • 1,095
2 votes
2 answers
1k views

Can't access to User Photo Url when Trigger

I have a problem when I trigger on the User object: I can't get the profile photo url. On this simple code I made a trigger to an User update and I send me by mail the fields FirstName LastName and ...
Florian Joubert's user avatar
2 votes
1 answer
2k views

Why I can not see the Email field for User object when using Object Manager?

I can not see the Email field on the object User while viewing it in Object Manager. Here is an attached screenshot(I sorted by field name and the email is missing): However if I am looking in the ...
Flowryn's user avatar
  • 141
2 votes
2 answers
9k views

How to add records to custom object in salesforce?

I have created custom object named as "Vacation Package" and added custom picklist value called Difficulty and specify two values: Easy and Hard. Now I want to insert the following four records. How ...
user avatar
2 votes
3 answers
60 views

Trigger ineffective - no errors received.. it just doesnt work!

Im very new to apex or indeed any program language to try not to laugh! Criteria given to me = if a case is of record type 'travel agent' and the case contact field is populated, update that ...
Louisa Pidcock's user avatar
2 votes
1 answer
1k views

Records not visible in object after insert through Dataloader

We are inserting 1000 records in to an object through Dataloader . The Success file shows item created for each of the 1000 records. However , when we are querying records from the object in Dev ...
Vanilla_Sky's user avatar
2 votes
0 answers
120 views

EnvironmentHubMember object is not available in salesforce sandbox,But this sandbox has 'Environment hub org id ',How can i enable it?

EnvironmentHubMember object is not available in salesforce sandbox,But this sandbox has 'Environment hub org id' ,How can i enable it?
ramesh's user avatar
  • 61

1
2 3 4 5 6