Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 104

Questions relating to Apex, the native programming language for the Force.com platform. Use it for general questions on syntax, errors, constructs, and rules of use. Most questions should include a code *excerpt* to help answerers understand specifically what has gone wrong or why you need help.

4 votes
Accepted

Clone SObject Relationships

See http://sfdc.arrowpointe.com/2011/03/28/cloning-records-in-apex/. It may help. It basically has a method that will build you a SOQL query that contains all the writable fields. … You'd need to make that query and then do a .clone() on the sObject in Apex and then make whatever changes you need, then insert it. …
hemmeter's user avatar
  • 898
6 votes

Using Trialforce orgs for blackbox-testing managed packages. Any experience?

I have not tried this, but I believe there is some overhead in creating & setting up Trialforce orgs that maybe you could avoid. What we do for Geopointe is we have a bunch of demo orgs we created fr …
hemmeter's user avatar
  • 898
4 votes

Trying to LIMIT a SOQL Statement based upon projected Heap size

Since I am trying to return so many records, I am using a formula to try and predict Heap use. I use a test query of 200 records, measure heap and then calculate what my limit could be to stay under i …
hemmeter's user avatar
  • 898
7 votes
5 answers
2k views

Trying to LIMIT a SOQL Statement based upon projected Heap size

We have a Visualforce page calling into a @RemoteAction method in Apex to return sObjects to the page. The catch is that the queries are very dynamic. … This is more of a question for the Salesforce Apex team, but wanted to start here so some knowledge can get documented for everyone to benefit from. …
hemmeter's user avatar
  • 898