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

0
votes
2answers
42 views

trigger to populate Contact lookup on custom object

I have a custom object, Deal_Reg__c. On this object, i have a Contact lookup field, Submitter_Contact__c. I would like the trigger to populate this Submitter_Contact__c field. The trigger will fire ...
2
votes
1answer
38 views

An Opportunity Trigger working in Sandbox (no data) but fails in Production :(, please help!

Thanks again for all the help I have received from the past, this community is awesome! :) I have written the code below and for some reason it works in Sandbox but fails in Production when I try to ...
0
votes
1answer
14 views

Approval Matrix using custom settings and its method

Could you help me with my method for my approval flow? I created a custom settings named Approver_Matrix . Here is a sample: Note: Private Account and Public Account fields were checkbox. For my ...
1
vote
2answers
41 views

How can i pass my object ID to my VF page using a custom button?

I have a custom object, Deal Registration, that can have a list of Products added to it. I create a junction object DealRegProducts. While on a Deal Registration, the user would scroll to the related ...
1
vote
2answers
38 views

Can you Help me with Code

Public static void opptyownermanagerupdate(Opportunity[] Opptylist) { List<Opportunity> Opptylists = new List<Opportunity>(); List<Opportunity> opptyToUpdate =new ...
1
vote
1answer
16 views

Account Trigger with Contact 'for' Loop error

I am relatively new to building Apex Triggers and need some help. Trigger's Purpose: The Account Triggers purpose is to throw an error message if there is no contact associated to the Account upon ...
7
votes
3answers
134 views

Detecting dead code in Salesforce

In Java, there are several effective tools for detecting dead code like CodePro. I have tried but probably they won't work for Salesforce project. It is not usually an easy job to figure out the dead ...
1
vote
2answers
60 views

Need help with test class for my first trigger, have researched!

I am new to apex and SF and need help in writing a test class for my trigger. This trigger runs every time a Calender event is created and updates the scheduled date and status on Opportunity. The ...
1
vote
0answers
30 views

Extact Target- Import subscriber to data extension using C# [closed]

I want to move the newly subscribed/unsubcribed users from my web application to Exact Target system daily.I have a CSV file exported from my web application.I want to import this CSV file to Exact ...
5
votes
2answers
193 views

Best version control for salesforce -eclipse and Mavens mate

Which is the best version control for force.com projects. Currently we are not using any version control and we are planning to follow some practices. We predominantly use eclipse and Mavens mate. We ...
1
vote
0answers
54 views

Not getting Activation Email link from Code @ Exacttarget

I signed Up a Developer Account @ Code.Exacttarget, but it is not sending first time activation link to mail Id. It says wait for minutes, but it's been 3 hrs I haven't got link.
2
votes
1answer
37 views

Code coverage too low

I created a class the will return set and get the parameter to rest service here is the class public class LeadUtils { public String First_nm; public String Last_nm; public String Phone; ...
2
votes
3answers
71 views

AMPscript variable question - how would multiplying them work

I am putting together a script that pulls information from multiple data extensions. I have completed the code for one data extension but I am not sure if I just need to duplicate all the variables ...
1
vote
1answer
36 views

Retrieving User information via API/Programatically

Can some one please let me know how to obtain the following information for a user programmatically or via API: : Token Client_Id Client_Secret We need to do this through a secure connection. ...
1
vote
2answers
165 views

Help for writing a trigger

I need to write a trigger :- A task should be assigned to an account on account creation if the reporting country of an account owner is in the United States. I have written the code partially, but ...
1
vote
0answers
149 views

Custom Button Using Search Functionality

I have a project I'm stumped on. I'm adding a detail page button that uses the search functionality to create a Find Duplicates Button on Contacts. Below is the code I'm using. I'm getting the ...
0
votes
2answers
92 views

Lack of Apex code Coverage

I'm trying to get a code to work that will set map an opportunity owner to the account owner but I'm getting failures for two lines. Any ideas? Broken lines start with a "**" trigger ...
2
votes
2answers
68 views

In System Logs what does the false|true mean for Variables

There's a lot I don't understand about the Execution Logs from Salesforce. Maybe some of it is just my limited programming experience (Apex mostly, smattering of Python). I feel like there must be ...
0
votes
2answers
1k views

Test Code for Apex Trigger

I am new to writing code and I spent some time writing the below trigger - now I get a code cover error when I try to move it to Production. I've tried writing some test code but can't get it right - ...
4
votes
2answers
188 views

Ctrl Click doesn't work in Force.com Ide?

I get used to ctrl+click code assist which would find the declaration of a variable/class/method in Eclipse, Visual Studio, Borland\Embarcadero Delphi. It is an extremely useful feature when dealing ...
1
vote
2answers
116 views

Use Shared Code For 501 Programming Assignment Exam

The new programming assignment is coming, can i use official shared code to complete the task? like: developer.force.com/codeshare or Smart Factory or Apex Enterprise Patterns or Flow Factory
1
vote
1answer
547 views

Connection between AWS(AMAZON WEB SERVICE) SES and sales force using apex code to send file attachment

public with sharing class AWS_SES { public String endpoint = 'https://email.us-east-1.amazonaws.com'; public String method = 'POST'; public string key; public string secret; public ...
0
votes
2answers
254 views

How apex get Executed

i write a Batch apex.i write an execute method .which is using a static variable of another class.because it is shhared.any one can use it and change it. public void execute(Database.BatchableContext ...
2
votes
2answers
817 views

Get the ID of Particular record on click of edit from List View page

I am opening one VF page on click of edit fo lis view of particular object. Now I want to get the id of that particular record which I edited. I am writing this code but its throwing this error. ...
2
votes
1answer
87 views

Structure and fuction for picklist's values

I'm tring to optimize the code below. I'm looking for a structure where i can put the picklist's values and after (with just a condition) i want check the condition for all the values in the ...
1
vote
2answers
2k 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
600 views

Can abstract classes have non-default constructors?

Abstract class: public abstract class FilterCriterionAbstract { protected Object leftComparableElement; protected Object rightComparableElement; public FilterCriterionAbstract() ...
2
votes
1answer
122 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 ...
4
votes
1answer
382 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 ...
9
votes
4answers
1k 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
175 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
349 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 ...
9
votes
2answers
2k 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 ...
4
votes
1answer
2k 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 ...
10
votes
2answers
123 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
1k 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 ...
2
votes
1answer
660 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 ...
10
votes
3answers
2k 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
933 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
460 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
549 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 ...
3
votes
3answers
2k 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
855 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 ...
19
votes
1answer
685 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 ...
2
votes
4answers
2k 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 : ...
18
votes
6answers
10k 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 ...