Schema is a tag used to describe questions related to the dynamic processing of the system schema through the various describe methods.

learn more… | top users | synonyms

0
votes
1answer
15 views

Custom object schema visibility

We are planning a managed application for Salesforce platform and there are few things that are hazy. Lets say if a customer install our managed application in their organization will they be able ...
1
vote
1answer
20 views

what does retrievable and replicable access meant for an object in salesforce schema?

From the access level for an object in salesforce schema i understood queryable, deletable and creatable, but what does retrievable and replicable access meant for an object in salesforce schema? ...
2
votes
1answer
92 views

Get Schema.SObjectField from Schema.FieldSetMember

I couldn't find any elegant (no use of Strings) to create a Schema.SObjectField from a Schema.FieldSetMember. Can you think of one?! The reason for asking this is that I was also unable to get the ...
2
votes
3answers
32 views

Order matters database item

Trying to setup a database where it has a table with a bunch of devices, but when displaying the devices order matters. I would need to be able to insert/delete devices in any part of the chain. We ...
0
votes
1answer
88 views

Database schema export

Hi we have a date export made from salesforce instance. We'd like to rebuild just the database but we stumbled on process to import the CSV files to a SQL Server database. We have force.com IDE ...
2
votes
1answer
51 views

How to display a list of all object types in Salesforce instance

I am trying to get a VisualForce page to display a SelectList of every object type in a Salesforce instance. Account, Contact, etc. I am using Schema.getGlobalDescribe()but am running into an issue ...
0
votes
1answer
30 views

How to save fields information also related object record Dynamically?

I have one requirement, Actually using below code i save object record in database dynamically. Schema.SObjectType targetType = Schema.getGlobalDescribe().get(strFieldName); SObject myObj = ...
1
vote
1answer
55 views

Create dropdown list of pricebooks

I'm in the process of creating a variable dependent picklist, where you can select a pricebook from a dropdown and then a multiselect picklist will show the products in that pricebook. So far, I have ...
2
votes
1answer
16 views

How to view inbound relationships

Working with a very large and complex salesforce setup, we have a custom object with several lookup fields to external objects. These are easy to check. I was hoping there would be an easy way to ...
7
votes
2answers
109 views

Difference between isCreateable and isUpdatable for DescribeFieldResult?

Can anyone explain the difference between DescribeFieldResult isCreateable and isUpdateable methods? Seems to me that isCreateable should apply only to an object, not to a field, but the ...
2
votes
1answer
71 views

Query table schema in SOQL

Is it possible to query the schema of a Salesforce table using SOQL? The MySQL equivalent is; SELECT * FROM INFORMATION_SCHEMA.TABLES
1
vote
2answers
42 views

Can I tell if I queried a field?

I have some code that queries some fields from an object. I then use the schema to loop over all of the fields of an object. Is there a way, while I'm looping through the schema to tell if I had ...
4
votes
1answer
298 views

How to get SObjectType for a given Schema.SObjectField?

I have Schema.SObjectField field = MyObject__c.myField__c; Schema.SObjectType objectType = getTypeOf(field); how would getTypeOfField() need to look like for this to be true? ...
1
vote
2answers
96 views

compare fields values for a controller, no trigger, Schema.DescribeSObjectResult?

I'm trying to find out how to compare fields values for changes. I have for custom fields that I need to know if they have changed before the user clicks on Save to run a logic before saving. This is ...
2
votes
1answer
84 views

Contact.LastModifiedById.getDescribe().isCreateable() returns true

How is it possible that the following code can return true Contact.LastModifiedById.getDescribe().isCreateable() It was my impression that the LastModifiedBy field was never createable
4
votes
2answers
77 views

Can you Access Workflow Rule attributes through Schema?

I need to load the attribute information about a Workflow rule into a custom object. I need the description, criteria, evaluation rule, and anything other detail about the workflow rule. Does anyone ...
8
votes
6answers
1k views

Bug with force.com IDE/Eclipse plugin with Spring 14 org's only

On two of my sandboxes I am getting an error every time I open a class or try to open the schema (the classes load but the schema does not). Other org's are working fine but these two, which are from ...
2
votes
2answers
177 views

Test if a field is available on arbitrary SObject record without using Describe calls

I have many Custom Objects in my package that have a common custom field Version__c. One part of my app serializes and deserializes records to/from Json. While deserializing I want to change this ...
10
votes
1answer
1k views

Getting “__r” relationship name from Schema.SObjectType.Fields

Say I have a master-detail relationship between two objects, Schematic__c and Part__c. I can SOQL query the master from the detail: [SELECT Schematic__r.Name FROM Part__c] If I'm building a query ...
13
votes
5answers
729 views

MavensMate/Sublime Text - how to investigate schema

I'm going through an evaluation of MavensMate and Sublime Text as a replacement of Eclipse IDE. Everything is working well and is a great alternative to Eclipse which is clunky and slow. The main ...
3
votes
1answer
2k views

Schema.getGlobalDescribe and “Invalid field LastReferencedDate for Account”

I am using this code to print out Account fields to PDF file . Programm fails when it tries to retrieve "LastReferencedDate" from the instance of account object. It fails with ...
3
votes
1answer
77 views

Fetching group Ids from OpportunityShare

I want to fetch all group Ids from an OpportunityShare table for a particular opportunity. I intend to do this by comparing all the Ids in UseOrGroupId column in opportunity share table against key ...
3
votes
1answer
2k views

How to get salesforce Ids for fields from apex using Schema methods?

I tried this approach, but the Salesforce Id is not being returned by getDescribe method. Schema.DescribeFieldResult field = Schema.SObjectType.Account.fields.Name; system.debug(' Account field, ...
3
votes
1answer
210 views

FeedComment Parent relationship

I have triggers on FeedItem and FeedComment where I need to dynamically read a field on their respective Parents (ParentId). For FeedItem I can do (for example): FeedItem.Parent.get('Name'); But ...
6
votes
1answer
476 views

Can I tell which fields are present in an sObject variable?

Is there a way to retrieve the list of fields in a specific instance of an sObject? That is, not all the fields that are defined on that sObject, but those fields which are populated on a particular ...
3
votes
1answer
63 views

Why are fields named differently on the child relationship entity vs the actual child object?

ProcessInstance has a child relationship with ProcessInstanceHistory. This relationship is called StepsAndWorkitems. Here it is in Eclipse's Schema Browser. Now, let's examine the actual child ...
7
votes
3answers
1k views

How should I build custom history tracking for a large number of fields?

I have a custom object where I need to track data changes to a lot of fields for regulatory reasons, far more than the maximum of 20 fields for standard history tracking. (Actually Salesforce ...
4
votes
0answers
192 views

Why is KnowledgeArticleVersion not in Schema.getGlobalDescribe()?

It's a bit inconvenient that this returns null: system.debug( Schema.getGlobalDescribe().get('KnowledgeArticleVersion') ); While this does not: system.debug( ...
4
votes
1answer
229 views

Are Field History tracking objects the only Salesforce objects that have fields of DisplayType “ANYTYPE”?

Field History tracking objects, such as "AccountHistory", "ContactHistory", etc., keep track of changes to field values on records of objects with History tracking enabled on those fields. The ...
0
votes
1answer
348 views

How to get fields in deeper object tree levels with reflection

I'm constructing a dynamic query to get some fields from the database. I use a root object for that purpose and branch out from it. My_Custom_Object__c -> Account__r.Id So if I want to get an ...
5
votes
3answers
2k views

How to find only those Schema.SObjectType types that are visible in the Schema Builder

I can find a map of all String -> Schema.SObjectType types by invoking Schema.getGlobalDescribe(). However, that includes a lot of object types I'm not interested in (like casecomment, ...
9
votes
8answers
2k views

Does Schema.GetGlobalDescribe() Account for Prefixes?

It seems to me that in my dev org at least, the keys for the map returned by Schema.GetGlobalDescribe() do not use namespace prefixes... so does anybody know what happens when there are two objects ...