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 36830

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.

2 votes

Getting unexpected token even when variable is declared

a list of Product__c public List<Product__c> doSomething(){ return [SELECT ItemSKU__c from Product__c where Description__c LIKE :skey]; } Seems that skuController() is the constructor of your Apex … controller public skuController() { productList = [SELECT ItemSKU__c from Product__c where Description__c LIKE :skey]; } } A better approach would be to use lazy loading if you are on Apex
Enrik Hysko's user avatar
0 votes

Get Network.getLoginUrl via SOQL dynamically

For anyone searching yet for a solution: String networkId = [SELECT Id FROM Network WHERE Name = 'COMMUNITY_NAME']?.Id; // (extra point) using Safe Navigation Operator (?.) System.debug('Community log …
Enrik Hysko's user avatar
0 votes
Accepted

Extending class variable does not exist on properties

It depends what instance is the newCheckPayment. I think you should make something like: BpmPayment.CheckPayment newCheckPayment = new BpmPayment.CheckPayment();
Enrik Hysko's user avatar
0 votes

How to delay an action called by an apex trigger

Your scenario seems to be achieved best by using: Process Builder with a Scheduled Action or Workflow with Time-Dependent Workflow Actions. Give it a try, it should be a straightforward solut …
Enrik Hysko's user avatar
0 votes

How to write a try catch for Rest Api

You are doing an insert, so it's a DML statement. So you can expect a DMLException error and you can make something like this: invoice__c thisinvoice = new invoice__c( ... try{ insert thisIn …
Enrik Hysko's user avatar
1 vote

Trigger Error: System.LimitException: Apex CPU time limit exceeded

I'm putting my edit as a separate answer: Besides the minor edit that I have made, the suggested solution from Adrian seems to solve your problem, where is used map collection (their primary use to s …
Enrik Hysko's user avatar
0 votes

Batch start CPU timeout - What influences start() post-processing?

Checking all the answers & comments what I can tell is: Have you tried removing the delete from the start method of the batch and put it on a separate batch and use batch chaining? (as @Adrian Larso …
Enrik Hysko's user avatar
2 votes

Error : JSON request body must be an object

In fact the response that you get is a list of fromJSON object. Below is the correct form (check also the other corrections I've made): @RestResource(urlMapping='/Portqii/*') global with sha …
Enrik Hysko's user avatar