An sObject represents an object, such as an Account or Campaign. An sObject is the base object for all objects in Apex.
2
votes
2answers
58 views
Determine sobject Type From Id Using SOAP API
I'm using C# and would like to determine the type of an sObject based on it's id.
I would like to pass an id to my app and have it return a list of accounts related to it. I need to identify the ...
5
votes
1answer
55 views
Is there a Class.forName() equivalent for Apex
I'm looking to dynamically instantiate a class by its name. How can I do that in Apex? I thought about a factory method with a series of if-else statements, but am not satisfied with that as it isn't ...
4
votes
3answers
88 views
Is it possible to pass sObjects to the REST api
I only found solutions that pass objects or primitiv datatypes to the REST API,
so do I need to pass these to rebuild my sObject or is it possible to pass it as an sObject JSON?
I tried to, but I ...
1
vote
1answer
27 views
Adding related list item to layout on install
I have an application that has a custom related list. At the moment, the related list needs to be added manually after the app has been installed through the page layout.
Is it possible to add this ...
3
votes
1answer
29 views
Get values of custom fields of a custom object using DescribeResult
I have a custom object Custom__c and I am accessing its fields by using
Public Custom__c custom1 {get;set;}
Map<String, Schema.SObjectField> map = ...
1
vote
1answer
30 views
Can't find ForecastingItem sObject in DescribeGlobalResult
We recently upgraded to salesforce API v27 (from 21). Documentation says that there are some new objects added between v21 and v27. ForecastingItem object is one such object. But when I get all the ...
2
votes
2answers
37 views
SOQL to get attachment(s) on PollPost
Just curious what SOQL I would use to get the Poll Items
(attachments) on a FeetItem with the Type PollPost?
So if we had a poll saying, "Whats your favourite color?"
How would I get the line item ...
0
votes
1answer
93 views
sObject ' ' type is not supported
Hey everyone I've been seeing this a lot lately and am trying to figure out why this error is thrown when querying the SOAP API directly. I've tried several very basic SOQL queries such as
SELECT ...
2
votes
2answers
63 views
SOQL query help using specific combinations of two variables that also appear in another object
I have two different custom objects. Each object is related to both an Account and a Campaign via a lookup field. So both objects have the following fields:
sObject.Account__c
sObject.Campaign__c
...
3
votes
1answer
51 views
Track Activities value for a custom object
I have a custom object. I enable Track Activities for this custom object and then I create a managed beta. If this managed beta is installed in a new org, the track activities will be enabled for ...
2
votes
1answer
309 views
Sending dynamic checkbox values from a VisualForce
I created a VisualForce wherein I display values from a map (returned from a custom controller with a SOQL request) using an apex:repeat. Each time I display this VisualForce page, the amount of ...
3
votes
2answers
106 views
Is it possible to convert an SObject to a Map?
Is it possible to convert an SOBject to a Map in a very few short lines of codes?
6
votes
2answers
61 views
Testing code that depends on an SObject
I have a page which displays an entity that belongs to another package. In order not have a hard dependency to this package, I build a wrapper object and make this wrapper object accessible to the ...
5
votes
1answer
77 views
Quick way to delete/truncate all records in an org
I have a development org with a quite complex object structure and a ton of demo data.
To refactor thr structure I want to get rid of all this data.
My first thought was to use the new "Truncate" ...
2
votes
1answer
47 views
Can standard field “Name” for sObject be longer than 80 Characters?
Question is the title of this question...or do I have to use a custom field?
0
votes
1answer
139 views
How to query CodeCoverage from SOQL? [duplicate]
Possible Duplicate:
How can I get code coverage programatically through Apex?
How to query CodeCoverage of a class by writing an SOQL inside Apexclass? Is there an sobject which stores the ...
4
votes
3answers
96 views
Get object sharing setting on Organization-Wide Defaults
Is it possible to know, via apex code, if a certain object is Private, Public Read-Only or Public Read/Write?
0
votes
1answer
46 views
Relation between lead, Account, oppurtunity and contact
Please explain me the relation between these 4 sobjects. How lead, Account, Opportunity and Contact are related to each other.
1
vote
1answer
90 views
Naming convention
What is the best naming convention developers around have been using for defining Record names to maintain uniqueness that can also be searched easily :
foreg: opportunity name : Opportunity ...
0
votes
3answers
90 views
System.QueryException: List has no rows for assignment to SObject
following apex code
public String getLastUpdatedAt() {
String timeStr;
DatadoctorStatus__c last = [SELECT LastUpdated__c FROM DatadoctorStatus__c ORDER BY LastUpdated__c DESC LIMIT 1];
if (last == ...
1
vote
0answers
125 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 ...
3
votes
1answer
192 views
Required Field on VisualForce Triggers “SObject row does not allow errors” message?
I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked ...
6
votes
5answers
172 views
Can you limit the visibility of fields based on record ownership?
I know with permission sets and sharing rules you can limit visibility and how users can interact with entire records. IS there any way to limit visibility of fields? We are looking to make the basic ...
6
votes
2answers
378 views
Why does JSON serialization give different results when the Sobject is created from a SOQL query and when the Sobject is instantiated normally?
I am getting some very odd behavior from the JSON serializer where if the Sobject was originally instantiated from a SOQL query it will exclude any fields that were not part of my query from the ...
3
votes
1answer
81 views
In Memory Init of sObject with Id for Update
Let's say I have a Contact, we'll say from Trigger.new. If I want to update its parent account, I skip a query by initializing it in memory like this.
Account acct = new Account(Id = ...
8
votes
1answer
440 views
Infering sObject Type from Id or collection of Id's
If I have an instance of an Id variable that has been populated with a value, is there way to infer the sObject type of that Id using a describe call.
So if I did:
Set<id> parentIds = new ...
3
votes
1answer
262 views
Find out the default record type of any Object in Apex
I've to find out the default record type of an Object so that I can use in Apex to insert/update records.
Found out that it is at the user level(user profile based). Is there any other way which I ...
-1
votes
2answers
253 views
Making Approval Comment Mandatory
Is it possible to make approval comments mandatory? There is one discussed here. http://christopheralunlewis.blogspot.in/2012/09/making-rejection-comments-mandatory-in.html
I've a two step approval ...
3
votes
1answer
53 views
Insert sObject share for task that the user doesn't own
As a regular user (not system administrator) is it possible to create a share for a object that I'm not the owner of in APEX?
Or will the DML statement throw an error?
9
votes
1answer
100 views
Does 'default value' do anything if the object is created through Apex?
I created a currency field on OpportunityLineItem that has a default value set to 0.00. In my test method I create a record and insert it. I then query it back out and try to assert that the field is ...
2
votes
3answers
182 views
Reports for two lookup objects that relate to a parent
I got a request this week from our customer service group that stumped me.
We use person-account, case, and a custom object called order (that person bought something). Both case and order have ...
3
votes
2answers
209 views
Setting Type of Event or Task via SOAP/REST API
I am looking at Object Reference for Event and Task sObjects and seeing that both have Type and Subject. I wanted to use Type as one of meeting, call, email and Subject as event/task title. But, if I ...
3
votes
3answers
321 views
SOAP API Request with body larger than 16 Kilobytes results in Timeout Exception
I stumbled upon an interesting limitation, it seems that SOAP API endpoint handles requests larger than 16Kb differently --- whenever body is larger than that request just times out.
We're using ...


