The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
135 views

Populating lookup fields using an external ID with Object type as String

My question is pretty much the same as here. But the difference is I'll have to do it generically. As in the object type is sent as text and I'll have to typecast in the code. Eg., //create an ...
2
votes
3answers
333 views

How to use Dynamic DML operation?

I’m having a requirement, where I guess I’ve to use Dynamic DML.But I’m new to Dynamic Apex as well as Dynamic DML. When I will create a Folder in Box.com server by using API call, I will get a ...
4
votes
3answers
2k views

Get field value dynamically

Let's say I have an sObject queried and want to dynamically get a specific field value. I need it to be dynamic so that it can be a different field through an input. sObject obj = [SELECT Id, Name, ...
1
vote
1answer
104 views

'FeedItem' schema type undefined in Trigger

I am trying to dynamically create an sObject in APEX based on the following code. Schema.SObjectType targetType = Schema.getGlobalDescribe().get('FeedItem'); system.debug(targetType); sObject ...
5
votes
1answer
322 views

Error when I populate lookup with external id using .put method

You can populate lookup fields using an object with an external id field populated like so: Custom_Object__c o = new Custom_Object__c(Account__r=new Account(External_ID__c='123')); insert o; ...
6
votes
1answer
1k views

Field Sets & Dynamic DML & Describing Fields Included in Field Set

I am attempting to write generic code which will use a fieldset, allowing for dynamic creation of a query. This bit is documented well enough in dynamic DML examples from SFDC. In addition to the ...