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

4
votes
1answer
33 views

Schema object name check results differ between managed package and a non-packaged code

I've created a function that determines if an object is real and (in this case) setting a variable to true/false based in that result. That value is then used to set a vf variable that will later be ...
1
vote
1answer
36 views

How can I create an Account Note or Contact Note via API that is visible in Salesforce UI?

I am using the python simple-salesforce library. Steps to reproduce. Create an Account: sf.Account.create({'Name':'Testy Account','AccountNumber':'123456'}) Query the Id of your new Account: ...
0
votes
1answer
20 views

how to fetch the picklist and filed values dynamically from multiple objects [duplicate]

public class PickListController { global static list<SelectOption> getPicklistValues ('Employee__c' , 'Priority__c') { list<SelectOption> options = new list<SelectOption>(); ...
0
votes
0answers
16 views

Two Object with Same Schema - Effects of Actions on each other

I am asking this question for the curiosity ? I came across following Interview Question asked to someone - Q: "I have two identical objects with same schema. If I want any action performed on any ...
0
votes
0answers
21 views

Real Estate: Asset, Product or Custom?

We're designing our schema now and are trying to stay as Salesforce standard as possible. We're a mortgage lending company, so our clients typically look to us to refinance their property debt. Use ...
1
vote
2answers
29 views

What's the best way to store many small reference tables in Salesforce?

Our iOS application gathers information about referrals. There are many pick-lists in the application which present several options. Some are single select, some are multi-select. The values change ...
1
vote
0answers
36 views

Best practice for custom fields added to standard objects in Managed Package

We have a requirement wherein we need to have certain custom attributes in the Account object within our Managed Package being deployed onto an existing SFDC set up. These attributes are readable and ...
0
votes
1answer
53 views

Dynamic Apex: find relations between sObjectTypes

I am trying to create a class that can dynamically execute its function independent of the sObjects and sObjectTypes provided. The class should check, wheter the sObjects provided do have existing ...
0
votes
1answer
44 views

How to check access of user for particular user on object

How do I check the access of current user on particular object dynamically. I have a custom mapping object in that I am storing object name in the string. I want to check Whether the current user has ...
0
votes
1answer
80 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>(); ...
3
votes
1answer
55 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 ...
8
votes
1answer
78 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
293 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 ...
5
votes
2answers
149 views

How to differentiate LIST apart from HIERARCHY setting in Apex?

My Apex code needs to dynamically reflect on user-defined Custom Settings. 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
58 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
83 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
90 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
104 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
17 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
639 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
257 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
35 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
720 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
2answers
239 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
98 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
133 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 ...
3
votes
1answer
423 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
67 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
222 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.. ...
8
votes
1answer
677 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
258 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
106 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 ...
4
votes
4answers
3k 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
235 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
55 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 ...
2
votes
1answer
229 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? ...
18
votes
4answers
4k 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
769 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
38 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
2k 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
504 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
108 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
327 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
28 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
969 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
841 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
59 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 ...
7
votes
2answers
2k 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
182 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
243 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