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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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 answers only user 887

Error - A mistake or Getting unexpected output or Bug

5
votes
Methods that have parameters can't be called from Visualforce. Instead you have to set fields of the controller class using one or more apex:param tags nested inside the apex:commandButton tag and mak …
answered Dec 1 '16 by Keith C
2
votes
This error normally means that an ID field referencing another object is invalid in the data. If by "update a set of users" you mean the User SObject, that object contains self references such as …
answered Feb 17 '14 by Keith C
1
vote
The starting point for debugging server-side logic is to turn on the debug logging. See Set Up Debug Logging - its easier than it looks from that page and Salesforce have made the default debug levels …
answered Sep 7 '18 by Keith C
1
vote
){ ... if(!AgencyList.isEmpty()) database.update(AgencyList,false); ... } but the trigger in many places only considers the first object. So separately from the governor limit error you … (); ... TriggerRecursionHelper.unCheckCreated(); } Suggested steps: Write the bulk case unit test for the trigger where multiple objects are inserted and updated and deleted; this test will fail Fix the governor limit exception Fix the logical error of only the first row being updated This work could take days not hours. …
answered Jan 22 '17 by Keith C
3
votes
should allow you to avoid the governor limit error, but the processing will be done asynchrnously i.e. all the results won't be available until some time in the future (e.g. 30 minutes but the time is not predictable). …
answered Mar 9 '16 by Keith C
3
votes
If you execute this code in "Developer Console"/"Debug"/"Open Execute Anonymous Window": System.debug('>>> isGroupable=' + LeadHistory.OldValue.getDescribe().isGroupable()); you will see that false …
answered Mar 5 '14 by Keith C
0
votes
One of the points of using a StandardController is that it does the work for you. So providing your page references the PageCount__c field, theStandardController will automatically query it for you. ( …
answered Nov 10 '14 by Keith C
0
votes
I think haagen's approach is a good one if the idea is to let the error happen in the trigger and then modify the error message. Personally, I would just live with users getting the direct red error … message... The error you are getting means that the owner that you are assigning to the Contract is not allowed according to the lookup filter defined on the Contract Owner field. So your trigger …
answered May 24 '14 by Keith C
1
vote
You have an extra "}" on line 9 that leaves the compiler thinking that its at the end of the trigger and that there should be no more text - hence the "for" is unexpected. Delete that line.
answered Nov 17 '14 by Keith C
2
votes
The code you have posted is valid Apex and reasonable. So the problem is either that some surrounding code is interfering - do you have something else called CharToNumber in any casing? - or that you …
answered Sep 9 '14 by Keith C
5
votes
Your test is testing the QueryHelper class only. To test the one line in the trigger (and so meet the trigger coverage requirement), you will need to make the trigger run by updating an OpportunityLi …
answered Aug 28 '17 by Keith C
0
votes
You are using a raw HTML input element and in that context Visualforce interprets this: action="{!Model.saveAllRelated}" as a reference to some text to output for a HTML action attribute i.e. a pro …
answered Apr 9 '16 by Keith C
3
votes
If you have data that you want to be preserved across calls to execute you need to add the marker interface Database.Stateful. In your current code the content of the lineIdToRevShed is not being pres …
answered Oct 1 '14 by Keith C
3
votes
Its usually best to use plural names for collections and singular names for individual instances: List<opportunity> opps = [select ... from opportunity where Id =:localId]; if(opps.size() > 0) { …
answered Jun 15 '15 by Keith C
1
vote
replace the last line with: insert new Contact[] {c1, c1}; the error you report will result. So the root cause is adding the same object reference more than once into the list that you insert … . There is nothing in the code you have posted that would cause this error so I presume the problem is in some code you have not posted. The best way to solve this is to review the code and make sure the …
answered May 13 '16 by Keith C

15 30 50 per page