A class is a template or blueprint from which objects are created. An object is an instance of a class.

learn more… | top users | synonyms

0
votes
1answer
12 views

Translate spanish characters to english for field values

I have a requirement to translate few predetermined spanish characters to english in field values of different custom objects. I have tried to create a generic code. can someone please let me know ...
0
votes
2answers
31 views

Null Pointer exception

I have below generic class, whose methods are called from an Account before insert , before update trigger. Below class is getting a Null Pointer exception for any Account at commented line. Can ...
0
votes
0answers
21 views

Generic class to do trigger operations

I have a requirement to create a generic class having a method to do all operations as in my below trigger. Now this trigger will invoke the method of generic class to do the operations passing ...
0
votes
0answers
27 views

Help with Inserting an Opportunity in a TEST Class for Code Coverage

I'm having issues with an APEX test class to provide code coverage to a Trigger I created. Here is the code of the Trigger. trigger UpdateOpportunity on Opportunity (before insert, before update){ ...
1
vote
2answers
30 views

Class to auto-create a record once a day on a schedule

Is it possible to create a class that will automatically add a record every morning at 9:00am? The record will have the same data in the fields it just need to automatically insert every morning. ...
0
votes
3answers
27 views

Picklist Values Synchronizing across objects

Good afternoon I am hoping someone can help. I have spent the last couple of hour’s researching the different possibilities and I am none the wiser Aim – If a value is added to the following field ...
2
votes
4answers
136 views

Apex Test Execution Stuck in Queue

I have attempting to run an Apex Test Execution and my test has been stuck in "Queue" since yesterday. It doesn't look as though I , as the Admin, have been locked but still no progress on the queue. ...
1
vote
1answer
22 views

How to select one field from one table in apex class?

I have an apex class with some code like this: public List<Product2> myList{ get{ myList = [Select p.url__c, p.ProductCode, p.Nom_du_produit_2__c, p.Description From Product2 p ...
0
votes
1answer
26 views

Apex Class that checks a checkbox when contact is generated (match.random)

I have partly created an apex trigger that randomly selects a contact that is in a specific campaign. This works and I can cycle through the contacts at random. When i refresh the page however I am ...
0
votes
0answers
28 views

split method occuring once

I have below class snippet where split method is parsing data only once. It should be doing for all data. csvfilelines.size() shows 5 but records displayed from the sObjectList is only show one. ...
0
votes
0answers
15 views

Apex Test Class for a Lead Trigger [duplicate]

Hi I am new to the salesforce development. I have made a trigger by looking at some videos but not sure about how to make a test class for it.I am pasting it over here. how shall i start. I havenot ...
0
votes
0answers
24 views

Store record values before update

I have a requirement to allow User Rollback the Updates here by one click on a commandbutton. That feature I have tried to tackle by Revert Changes button here . Is there any other way to deal with ...
0
votes
1answer
46 views

Display error message from controller fails

I have below apex page where I am trying to catch a custom apexpages.addmessage from the controller. But it is not working , simply not displaying the error message in page. Can someone please help? ...
0
votes
0answers
16 views

Write a batch class which will delete the saved files from that folder

Can any one help me out this ? Write a batch class which will delete the saved files from that folder and e. Batch will run every week.
0
votes
1answer
53 views

Access user creating a record in before insert trigger

I'm trying to set some default values for contact fields based on which user is inserting the record into the database, but am coming up against a NullPointerException as the CreatedById is null ...
0
votes
1answer
24 views

Attempting to deploy SF samples to sandbox, blocked by low test coverage

I'm trying to deploy a class to production, and after doing some reading I set up the proper ant things and decided to deploy the sample classes to the sandbox first. I get the following errors: Code ...
1
vote
2answers
67 views

Compile Error: Constructor not defined: [MyController].<Constructor>(ApexPages.StandardController)

Can I get some help with my test class for my visualforce page? The page lists contacts and then the controller creates an activity for each contact selected after a button is clicked. I am ...
1
vote
1answer
17 views

Eclipse IDE changing class status to 'deleted' does not stick

I am trying to delete a class in production.I have deleted 2 classes successfully by changing the status of the corresponding metadata.xml to deleted.But in one class while I am trying to change the ...
0
votes
2answers
52 views

How can I move the following trigger logic into an apex class?

How can I move the following trigger logic into an apex class? trigger AssignAccNumber on Opportunity(before insert,before update){ List<Id> accIds = new List<Id>(); for(Opportunity ...
1
vote
1answer
44 views

System.DmlException: Insert failed. first error: REQUIRED_FIELD_MISSING, Required fields are missing: [AccountID__c]: [AccountID__c] line 49

I'm trying to CREATE or UPDATE an SOBJECT "AccountProjectEngament__c" this following code works on my sandbox, but i can't upload it to my production site. i have the following error: ...
1
vote
1answer
15 views

Initial term of field expression must be a concrete SObject: LIST<Call2_vod__c>

I am getting subject error with below code. The line number is on update statement conditional if clause. But I can't get why I am getting such error? I have a trigger validation for those ...
1
vote
3answers
78 views

Detail of Page A Repeating on VF Page w/ Custom Object A Sibling Object Records B on Visualforce Page

I have a custom object "Success__c" that I am attempting to create a visualforce page for. I would like to have the parent (MD relationship via account__c) Account fields on the page, as well as the ...
0
votes
1answer
16 views

Attempt to de-reference a null object: Error though have data

I am getting the subject error for below piece of code , exactly at below line. Though I have data in call object.Can someone please let me know the root cause and guide towards it's remedy? error ...
1
vote
1answer
46 views

Type casting error

I am getting runtime type casting error with below code. Can someone please help? Code: global class batchCallUpdate implements Database.Batchable<sObject> { global Database.QueryLocator ...
1
vote
0answers
26 views

Update fails without error

I have below class where update on mycallsInc not happening. Can someone please help me? public void Publish() { List<Incident_abv__c> selIncs = ...
0
votes
2answers
22 views

For loop issue in class

I have to get IDs of Call custom object from Incident Transaction custom object and run a for loop on call feeding the list. Can someone help me here? List<SObject> myCalls = [SELECT ...
2
votes
2answers
122 views

Can I override a private abstract method from abstract class?

I have an abstract class which has abstract methods. All methods are public. I don't need them to be public, so I tried to remove public or put private. But it keeps saying Compilation error: ...
0
votes
0answers
14 views

Track records update based on User entry

I have a requirement to show five sections with different SOQL querry records. Now one common field in all of them is an input text PICKLIST field. While doing update I want to track only those ...
0
votes
1answer
41 views

Update list values in an input text field

I have below code to update the input text field value for OUTCOME field from the User. My list update is failing to happen without throwing any exception. Please can someone help me here? My ...
3
votes
1answer
65 views

Can I save a new Apex class using Tooling API in java?

Is it possible to create a new Apex class using Tooling SOAP API in java? When I'm trying to do that I get ApiFault exceptionCode=’INVALID_TYPE’ exceptionMessage=’This type of object is not ...
0
votes
1answer
17 views

Need to refer child objects records also in PDF

I have a requirement to display child object records also alongwith Parent records. Please find the below SOQL pattern. SELECT Name, Account_Abs_abv__c,Account_Location_abv__c,Attendee_Role_abv__c ...
1
vote
2answers
52 views

How do you call a custom setting to open in a new window?

I have a visualforce page with custom buttons. Twas asked to add to the Custom Setting a field called ATLAS_ENDPOINT. I need to use this value to popup a new window with the link inside. VISUALFORCE ...
0
votes
0answers
45 views

Attach a dynamic PDF page

I have a requirement to create a pdf page in a new window based on dynamicly created records of custom object Incident__c when an User clicks a custom button. Then mail the PDF to the User. Please ...
1
vote
0answers
54 views

Generate class and sequence diagrams

I need a tool to generate class and sequence diagrams for my apex classes. I tried Objectaid but it does not generate class diagrams perfectly. I see some random variable/ method names because of ...
0
votes
2answers
41 views

Background colored column headers in a pdf apex page without using pageblocktable

I have a requirement to show colored backgrounds for column headers of tables. Can someone suggest a way out without using pageblocktable? Please find my controller class here. public class ...
0
votes
1answer
59 views

Trigger to make @future callout to the Data.com match API

My company uses data.com premium. We want to create a trigger that will update a lead based on company information since the out-of-the-box functionality only matches based on the lead. (contact). I ...
0
votes
0answers
29 views

sorting is not working

Public class CampaignmemberSa{ public lead l{get;set;} public Boolean show{get;set;} public String sortExp ; public String sortDirection; public List<Innerclass> ...
0
votes
1answer
84 views

Error: Compile Error: Invalid bind expression type of Schema.SObjectField for column of type Id at line 9 column 136

Public class CampaignmemberSa{ public lead l{get;set;} public List<Innerclass> wraplist{get;set;} public CampaignmemberSa(){ wraplist= new List<Innerclass>(); } Public void ...
-2
votes
1answer
137 views

Cannot Specify Id in an insert call error [duplicate]

I have been trying to do a bulk load of accounts in salesforce and it keeps triggering the following error UpdateCSMTeam:execution of AfterInsertcaused by: System.DmlException: Insert failed. ...
0
votes
1answer
43 views

Rewrite apex class to be out of the loop

I have an apex class that I have been having trouble with when I try to upload in bulk accounts. It is tied to triggers that do certain things depending on whether the Customer_Success_Manager__c ...
1
vote
1answer
127 views

Turn off Trigger and Classes - Code coverage error below 75%

I need your help on this one. Need: We have several triggers that use classes and we need to disable or deactivate both the triggers and classes in production because they are causing issues with ...
2
votes
1answer
117 views

APEX Dataloader fail INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call

I have a trigger and a class that seem to be causing an insert fail in Dataloader. I am trying to insert 200 records to see if an error is generated before moving these to production. I'm just ...
0
votes
1answer
67 views

Help with Trigger Compile Error: Method does not exist or incorrect signature: [MAP<Id,AccountTeamMember>].containsKeys(Id)

I am VERY new to apex coding and am trying to figure out why the trigger below gets the "Compile Error: Method does not exist or incorrect signature: [MAP].containsKeys(Id) at line 10 column 13". I ...
2
votes
2answers
122 views

Constructor not defined error

Please find my below code: public with sharing class IncForRep{ public Summary[] Summaries { get; set; } public IncForRep() { List<Incident__c> results = [SELECT ...
5
votes
1answer
62 views

Why can I not reuse the name of Apex classes deleted in previous releases?

Because the documentation defines it that way. Yes since Winter'15 it explicitly states: Although a component is deleted, its Name remains within Salesforce. You can never create another ...
1
vote
1answer
39 views

How to direct a Flow to two different Visualforce (finishLocation)

I am fighting a flow and I want to know if it is possible. The result of the flow is a variable ContactId I want that when the flows ends: - if the ContactId is null, the finishLocation should be ...
1
vote
1answer
58 views

Trouble deploying from Eclipse - test and code classes

I am new to this community and using eclipse but have gotten the basics down. I am trying to create a button on our lead page to go the next record in the list and have found this post stating ...
5
votes
2answers
108 views

Moving Triggers to Utility Class

I am beginning the process of moving all of my Sampling triggers to a utility class, and I am hitting a few snags. I have the following line of code to which I am getting the following error Field ...
3
votes
1answer
81 views

New protected methods cannot be defined in non-virtual classes Error

Im trying to re-create a class with new namespaces and a new name to the class. In the process i'm getting the save error "New protected methods cannot be defined in non-virtual classes" please find ...
1
vote
1answer
75 views

Test class for VF form can't refer to input: 'variable does not exist'

I am very new to the model-view-controller and have barely been able to get my code functional, but now I'm struggling even more trying to write test code! This is my first wrapper class, controller ...