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
10 views

Query Routing Addresses Email2Case.? [on hold]

I need to query Routing Email address in Email to Case and show in From Address list(Select List) on a VF page.? Is there a way we can query those.? Please help its urgent.
2
votes
2answers
38 views

Different results for Schema information in different classes - why?

I'm experiencing a very odd behaviour in my SF org. I have two classes that have an identical method: /* works */ public with sharing class classA { public static void ...
2
votes
1answer
47 views

How to check if an object has recordtypes specified or not?

I want to find a way how can I check if a type of object, has any record types specified or not. I tried, with the describe methods, by acquiring a List, according to the SObjectType, but this ...
-1
votes
1answer
49 views

How to get a list of SObjects which have self lookup field on them USING schema class

public with sharing class listOfAccounts { public list<Schema.SObjectType> gl {get; set;} public list<string> listOfObjects {get; set;} public listOfAccounts() { ...
1
vote
1answer
11 views

CaseTeamMember not returned as a Child

When getting schema info for objects related to cases Case Team Member does not show up. Case Team Member has a lookup to Case so I would think the relationship would work. Does anyone know why this ...
2
votes
1answer
175 views

Schema fields getMap() doesn't return all the fields

I'm using Schema to retreive the fields and put them in a map that I can use in my Visualforce page. public Map<String,String> m1{get;set;} public List<String> fieldsList {get; set;} ...
3
votes
1answer
132 views

Custom Object Prefix in URL Hacking Using Custom Button

This question is inspired by this Post. Can anyone enlighten me more about "object prepend" mentioned in this post. So in an example URL like ...
1
vote
0answers
31 views

getDescribe() of an External Object throws NPE

I have a external object called "TD_Account__x" whose label is "TD Account". I am trying to do a describe call on "TD_Account__x" and it throws me NPE. Execute anonymous code - System.debug('@@ ...
0
votes
2answers
299 views

How to get Standard and Custom Object List in Apex class

I am trying to get all Standard and Custom Objects name from Schema class in apex class. I need to remove all shared objects from the list.
1
vote
1answer
118 views

RecordType DeveloperName dynamically using scehma.getGlobalDescribe

Hi I need to access recordtype details for case Object using DeveloperName. Is there any way I can get complete record type details using schema.getGlobalDescribe method? Or is there any other way to ...
0
votes
0answers
60 views

How to remove Salesforce ReadOnly or inaccessible Fields form a TalenD schema automatically?

I use TalenD for an ETL job to copy data from Production to Sandbox. The basic approach is described in this nice article here: ...
5
votes
1answer
77 views

Standard field accessiblity inconsistent : feature or simply strange?

UPDATE: Thanks to @ca_peterson I could clarify the issue below and it all drills down to FLS. But even having identified FLS as the reason, the behavior is still odd and I have addressed it in this ...
0
votes
0answers
47 views

Dependent Picklist feature in Data transfer object

I have a DTO to do mass updates on few objects. Now here for TSF custom object I have two picklists one depending on another. say PICKLIST A has values X, Y, Z. If it is X , values shown for PICKLIST ...
3
votes
1answer
236 views

How to get a DescribeFieldResult from a FieldSetMember?

Fieldsets can reference fields in related objects, something like Opportunity.Account.Name. If you iterate over such FieldSetMembers on a Visualforce page and try to render a fields inline help text ...
0
votes
1answer
54 views

Attempt to de-reference a null object: Error though have data

I am getting the subject error for below piece of code , exactly at below line. Though I have data in call object.Can someone please let me know the root cause and guide towards it's remedy? error ...
0
votes
0answers
195 views

Attempt to de-reference a null object error in my apex class

I got Attempt to de-reference a null object error in my apex class.. We have to execute the fallowing code by schema... ANY ONE CAN HELP ME REGARDING THIS.... Here is my vf page and apex class.. ...
7
votes
2answers
419 views

How to list down all Standard/Custom Objects and ignore System(Internal) Objects

There's always a requirement to pull ALL standard and custom objects using describe call ignoring all system/internal objects. Is there a way for same? One of option is to reference ProcessInstance ...
1
vote
2answers
134 views

Get Created Date of Custom Objects in Visual Force page

I want to get the created date of all the custom objects present in my Org.
0
votes
0answers
52 views

Insufficient Privileges on button click

I have a class in with Schema.getGlobalDescribe() getting all the object and all the information related to it. On the page load it is not giving any error I can see the filed related to all ...
3
votes
3answers
1k views

How can I export object's field schema information to excel?

How can I export the fields of an object from Salesforce into an Excel sheet ? I dont want the data !! I want the fields, kindly help me
1
vote
1answer
134 views

How to use Data Category Visibility in a data category picklist that generated from code

Problem description: I have a picklist for data categories which I am generating dynamically from apex code, currently because I'm doing it from code using Schema.describeDataCategoryGroups and ...
0
votes
1answer
45 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
141 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? ...
15
votes
4answers
2k views

How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects)

Is it possible to get the Type of an Object (it's not an SObject)? String s = 'test'; doSomething(s); public static void doSomething(o Object) { // need to find out if o is a string or an ...
2
votes
1answer
516 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
34 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
1k 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
280 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
81 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
238 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
19 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
474 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
453 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
48 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 ...
5
votes
1answer
960 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
144 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
169 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
123 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
538 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 ...
12
votes
1answer
2k 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 ...
16
votes
5answers
1k 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 ...
5
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
101 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 ...
4
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
400 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 ...
8
votes
1answer
930 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
104 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
3k 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 ...
5
votes
1answer
331 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( ...