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

Incompatible value type id for Map error

Anyone know why this keeps throwing an error? list<Account>Dealerships = new list<Account>(); map<Id, OpportunityLineItem> Opp2Deal = new map<Id, OpportunityLineItem>(); ...
2
votes
1answer
31 views

How to use soql queries on multiple look up relationship object to retrieve specific data

I have 4 custom objects (as shown in the schema diagram). And they are associated using a lookup relationship. Now the objective of my question is to retrieve Product profile(product) for a given ...
7
votes
0answers
34 views

What's the pattern for Platform Encryption field mask length?

I've enabled Platform Encryption on standard Account and Contact fields, as well as on custom fields. In general masked field values are displayed as 5 asterisks (*****), but there are some ...
0
votes
1answer
31 views

get picklist values of custom field into customButton javascript

Is it possible to populate the custom field picklist values into a custom button javascript code? Any pointers on how to use Schema.DescribeFieldResult class in javascript? I am actually working on a ...
3
votes
2answers
72 views

How to determine LIST from HIERARCHY custom setting in Apex?

My Apex code needs to reflect on what will be a user-defined Custom Setting. But the user could use a List or Hierarchy depending on their needs, so I need to be a bit careful manipulating each type. ...
1
vote
2answers
55 views

Contact object access check fails in Group Edition

This piece of code returns FALSE in a Group edition organization owned by a customer, and I'm unable to figure out why. When tried in a brand new GE org provisioned via EnvHub, it works properly. ...
2
votes
2answers
40 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
52 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
52 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
12 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
264 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
167 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
367 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
133 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
63 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
82 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
272 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
55 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
202 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
461 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
149 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
65 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
154 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
48 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
153 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
3k 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
561 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
311 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
83 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
254 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
23 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
529 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
524 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
49 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 ...
6
votes
1answer
1k 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
151 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
181 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
126 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
2k 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 ...
3
votes
2answers
588 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 ...
13
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
2k 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
103 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, ...