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 22529

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.

0 votes
Accepted

Apex Testing Failing at 23%

You are not calling send() method in test class. Add following line to your test. consext.send(); On the other hand, your test is doesn't look good, first of all you are using seeAllData=true, whic …
oozkan's user avatar
  • 599
2 votes

Duplicate values in grouping of List

You have multiple problems in your code, but your biggest mistake is placing a query inside for loop. Following query is inside of your loop. List < Contact> ConList = [SELECT ID, FirstName,LastName, …
oozkan's user avatar
  • 599
4 votes
Accepted

Why am I not able to update account record using Name field?

For upsert calls important thing is providing a unique Id, even an externalId field which is not unique will result an error. Check following question asked before. So in your case, since Name field i …
oozkan's user avatar
  • 599
0 votes

Test class coverage for custom label

You should receive following error by comparing label value and Boolean. Comparison arguments must be compatible types: String, Boolean
oozkan's user avatar
  • 599
-1 votes
Accepted

Displaying list of page layouts in Visualforce

As mentioned in following post page layouts are only available through the Metadata API. You will need a complex process to retrieve information you asked for. you can find the details in the linked p …
oozkan's user avatar
  • 599
0 votes
1 answer
363 views

Rollback on external user creation

I am wondering is it possible to rollback when external user creation fails after password do not meet org requirements? A detailed explanation: I am currently using createExternalUser method in orde …
oozkan's user avatar
  • 599
10 votes

Issue Setting ContentVersion Owner

Add this line: newContentVersion.firstPublishLocationId= user.Id; A more detailed explanation: When documents are created via apex (contentversion object), you need to specify the library otherwise …
oozkan's user avatar
  • 599
0 votes

Is there a way to add particular <div> tags into a pdf on a button click in a vf page using ...

What you need is to create a controller, and inside controller you can create dynamic apex tags (or reRender some portion of the page with new added elements) and then use following getContentAsPDF method …
oozkan's user avatar
  • 599
0 votes

Custom Object how to get actual query data?

It is normal that you receive 3 records from query, because you are still in scope of update trigger and result (4th checkbox change) is not committed. Just get 3 values from database and the remainin …
oozkan's user avatar
  • 599
1 vote
1 answer
718 views

Is there a way to force apex code return status code 400 on remote action without throwing a...

I have a remote action that throws a custom exception on apex side when an error occurs, and on javascript application, response occurs with status code 400. … Is there a way to force apex side to return status code 400, other than throwing exception? …
oozkan's user avatar
  • 599