Code indicates that a question is to do with pages, controllers or similar, and not the declarative aspects of the platform.

learn more… | top users | synonyms

1
vote
2answers
109 views

Trigger to update Account from Case field

Every time I think I have got these triggers figured out I have to create something new and I am stupid all over again! This time I have to update a field on the account with either 'R', 'Y' or 'G' ...
3
votes
1answer
68 views

Can abstract classes have non-default constructors?

Abstract class: public abstract class FilterCriterionAbstract { protected Object leftComparableElement; protected Object rightComparableElement; public FilterCriterionAbstract() ...
1
vote
1answer
42 views

Code Coverage - Blue versus Red

I have various ranges of code that never show as "covered" in Apex Tests. Here are two examples. Could someone give me some guidance on them? How would I cover them? One: ((Just the ...
3
votes
1answer
138 views

Fuzzy Matching for Duplicate Address Checks

A good duplicate checker - for checking if the same address has already been entered - needs to take into account misspellings or spelling variations. We have implemented our own APEX methods which ...
6
votes
4answers
139 views

Source control tool for Salesforce development

I am looking for a source control tool like Github which can do the following for us. Provide a cloud based source control repository like subversion, etc. Provide web based view to track changes. ...
2
votes
1answer
38 views

Queue Color Modifications

Our inbound emails are worked out of the Service Console. Messages coming in will end up in a Support Queue and then escalated/passed to different queues or technicians when appropriate. We receive ...
1
vote
1answer
73 views

Getting revised map <id, string> data back into original list under same id

I seem to be having difficulty getting data from a map back into a list so that it corresponds to the correct Id and field it was originally associated with after it's been modified in a trigger. For ...
8
votes
2answers
472 views

Visualforce and Apex Theme for Notepad++

Are there complete themes for Visualforce and/or Apex for Notepad++? Ideally with autocomplete for all parameters and methods and code highlighter? I made custom a theme for Visualforce only but ...
2
votes
1answer
248 views

Structure for classes to call inner or sub classes

I don't have a Java background and am working on a class where I'd like to be able to call inner classes from withing methods of the outer class. As much of Apex is implicit and I'm still learning, I ...
9
votes
2answers
88 views

Incomplete code blocks vulnerability

I've submitted my application for Security Review and I've got this problem in the report. I'm not sure how to fix it. Let's see the First case: I have some classes that don't have any code like ...
3
votes
4answers
155 views

Code Formatting

Has anyone gotten code formatting (Ctrl+Shift+F) to work in Eclipse? I know it's basically a Java feature but it would be neat to format Apex code according to rules. I also can't get some hotkeys ...
1
vote
1answer
167 views

Using RegEx Pattern Match to create DateTime fields in trigger

How do I write code with the correct syntax to run a pattern grouping match within a string, then replace the pattern groups found in the result so that they follow a desired pattern? I've never done ...
5
votes
2answers
116 views

Verification code - when is it asked?

I've read a lot of docs for this and I'm not completely sure of what are the conditions for the login verification code be asked. Can someone please help with this question and clarify me? Thanks
0
votes
3answers
335 views

Code Coverage on Triggers - no coverage for IF…TRUE?

I am woefully lacking in my Class writing skills. I'm curious if anyone can tell me (or give an example that works) why I cannot seem to get many, if any, IF...TRUE statements to be covered by Code ...
0
votes
1answer
125 views

Code Coverage on Triggers - color coding

This is probably overly obvious, but I do not wish to assume, and I am finding no reference anywhere: What does the COLOR CODING when viewing percentage coverage on a Trigger mean? Some code is ...
6
votes
3answers
254 views

How can I rewrite this method with efficient SOQL queries

public List<phonesterDat> getCompanyData() { List<phonesterDat> var1 = new List<phonesterDat>(); for (Keyword__c keyword : [select kw__c from Keyword__c]) { phonesterDat var = new ...
2
votes
2answers
727 views

Passing list from Controller to VF page

I'm trying to pass a list from controller to page and use it in Javascript as an array to form html content. But, when I pass a list of objects, an exception is thrown. Uncaught Syntax error : ...
3
votes
1answer
443 views

Code Coverage question

I saw for the first time in one of my orgs where there is a 29% (61/208) what does that number in the brackets say ? I have never seen it in any other org. Is this a new release for winter 13 or has ...
12
votes
1answer
160 views

What's the best way to check if person accounts are enabled via Apex Code?

I need to be able to check if an org has Person Accounts enabled via Apex Code as part of package. What's the best way to do this without making the package require Person Accounts be enabled in any ...
1
vote
4answers
455 views

How to print a quote or invoice from salesforce

How do I print a Bill, or an Invoice on a custom object on the click of a button. Things I've thought of Printable view : it does not give me the control to change the formatting Visualforce Page : ...
8
votes
5answers
2k views

Copying metadata and code from one Production org to another

How do I copy(for want of a better word) metadata (i.e. Objects, Workflows, Validation rule etc), and code (Apex, Visualforce, Triggers) from one Production org to another production org? Is this ...