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 24268

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

Query List of Opportunities in Apex

Would something like this pull in the current user's ID that could then be used to query against? public OppExt() { } public user currentuser{get;set;} public List<Opportunity> Opp {get;set;} …
smckitrick's user avatar
1 vote
1 answer
653 views

I have the same field listed twice on a visualforce page. Can I link the 2 to change values ...

I am working on making a dynamic Opportunity edit page that hides and renders the displayed fields as the stage is updated. Now, when I change my stage, the fields listed under my "Actions" section ch …
smckitrick's user avatar
0 votes
2 answers
1k views

Test Class AssertEquals not finding correct value

I am encountering something odd with this test class, and I either do not know how to phrase my issue, or it is just odd. I have 2 triggers that I am checking. The first trigger is on an Opportunity. …
smckitrick's user avatar
1 vote
Accepted

Test Class AssertEquals not finding correct value

I found the issue that I was having. I have some workflow rules that update the account when it is created. The test was inserting the account, the workflow rules were then updating the account. That …
smckitrick's user avatar
1 vote
Accepted

Querying recent Contact for the Owner of User logged in

Your existing query is trying to match the Contact ID (starts with 003) with your User ID (starts with 005). Your list will never show a matching record. You need to change your query to link the Own …
smckitrick's user avatar
1 vote
Accepted

Need help with writing a trigger on Opportunity object to update Lookup field at opportunity...

You could try something like this. Please forgive any typos. trigger updateOppSalesManager on Account (After update) { //Create Sets and Lists Set<ID> OppAcc = New Set<id>(); List<O …
smckitrick's user avatar
0 votes
Accepted

Apex trigger: Test class Assertion failed

You will need to re query the data after it has been inserted. Otherwise, the system is still looking at the initial data you added. Something like this should help. //We check for each of the trave …
smckitrick's user avatar
-2 votes

Need help on understanding this requirement

Here is what is within the new above link that may be of some use. 1.Create an Apex class (ProcessApplicant) that implements the InboundEmailHandler interface. … Enter ProcessApplicant for the Apex Class. Click Save and New Email Address. Since the Email Address and Context User fields have been automatically populated, click Save. …
smckitrick's user avatar
0 votes

Update field on opportuntiy depending on Opportunity Contact Role

I have a similar situation for this. I used the code at the following link as my base, and modified it from there to meet my requirements. https://developer.salesforce.com/forums/?id=906F00000008yPp …
smckitrick's user avatar
1 vote

Unable to read values from Standard Address Dropdown list in Before Insert trigger

Since State is a picklist, I am guessing that you have State and Country picklists enabled. If that is the case, then you should use ShippingStateCode and ShippingCountryCode in your trigger.
smckitrick's user avatar
0 votes

How can I add a Custom button to a Custom Visualforce page?

Try something like this. I don't know what your button name is, but I have a custom button that does some page updates on Leads with a similar entry. <apex:commandbutton action="{!URLFOR($Action.Oppo …
smckitrick's user avatar