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
9 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 ...
0
votes
2answers
38 views

Custom Object Sibling Object Records 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
13 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
33 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
91 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
12 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
25 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
48 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
14 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
36 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
36 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
42 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
27 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
40 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
20 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
45 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
67 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
36 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
79 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
81 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
48 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
109 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
53 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
28 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
52 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
83 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
71 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
53 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 ...
1
vote
0answers
70 views

VisualForce Page to Convert Leads to Opportunities

My colleague and I have been tasked to update our Convert Lead workflow. The process is still the same of converting the leads but we now have new fields and values that the user can choose and we ...
-1
votes
1answer
91 views

Writing a test method to increase code coverage

I have been trying for about a week to figure out how to write a test method that will increase my code coverage and cannot figure it out. This is the code I have. public class ConvertToVolunteerJob ...
0
votes
1answer
42 views

test method code coverage

this class and I need to turn up the code coverage of 78 to 100 The class public class AlsurOrderAssignment { public CPA_Order_Allocation__c allocation { get; set; } public ...
3
votes
1answer
46 views

Counting Activities (Open/Closed Tasks and Open/Closed Events) Compile Error: expecting a colon, found 'system.now'

Issue: Below is a part of my class for updating Activity Count fields. I want to only select the id's from closed Tasks and also closed Events. I have no clue why my two lists below give me the ...
10
votes
1answer
73 views

When to add apex class permissions to a profile

The apex class permissions are a bit confusing to me. For example, classes used by page controllers do not need to be added to the profile. Can anyone give a complete list of scenarios on when you ...
0
votes
2answers
41 views

Apex Test Class for trigger [closed]

Below is my first trigger and it works! Then I found out I had to right a test class and I have no idea where to start. Please advise. Thanks! trigger CreateProject on Opportunity (after update) { ...
4
votes
1answer
74 views

Creating a Custom Object Handler Class

So I want to create handler classes for different Objects with my SF org, specifically for some of the custom objects. For instance I have a Global__c object that stores global settings in encrypted ...
3
votes
1answer
63 views

How to achieve Test Coverage for Interface Classes

I am using the trigger framework presented here, which uses several interfaces and utility classes: ...
2
votes
1answer
33 views

How to create object by it's name?

I'm writing a REST service which calls external service. I want to write a test for my service. I came up with no possibility to mock this call as it's in managed package. I want to wrap this call ...
0
votes
0answers
30 views

Removing a selected case from the queue

I have a queue that cases are put into before notes are submitted to them. Right now I have two methods that remove the last entry and removes all entries; however, I cannot figure out how to remove ...
3
votes
1answer
64 views

Two almost indentical test class, one passed one failed

Someone else created a class and test class that works fine: CRequestForm_SearchController and CRequestForm_SearchController_test. I made some edits to the class in sandbox, and copied the test ...
2
votes
2answers
108 views

HttpResponse StatusCode=200, but 3rd party request (Pardot) not made

ObJective: I am attempting to create a new prospect in Pardot when a lead that had no email gets updated with an email (Pardot will sync accounts but until the lead email exist there is no prospect to ...
0
votes
2answers
31 views

How can I mock a query of ApexClass for testing?

While recently working on a large project where unit test executions would run upwards of 2 hours, we realized we could get a performance gain by avoiding touching the database (e.g. SOQL and DML) ...
2
votes
1answer
62 views

Attempt to de-reference a null object

When I try to load the visualforce page it gives me the error "Attempt to de-reference a null object " I have narrowed it down to the line of code lstNotes.add(new NoteWrapper(lstNotes.size(),new ...
0
votes
0answers
19 views

Share Map between Outer and inner class [duplicate]

I want to implement the following setup: public class Outer{ public Map<string,string> PackageTransportUnitType { get; set; } public Outer(){ PackageTransportUnitType=new ...
2
votes
1answer
50 views

Not enough coverage for Apex utility Class, although COLLECTIVELY my unit tests cover everything

I've moved a lot of my trigger code over into class methods so I can control what order the logic happens in. Each object has one Trigger like this, and each Trigger may might call up to a dozen ...
0
votes
1answer
30 views

Accessing Picklist values from controller

I am trying to bind a pick list from a controller, my goal is to get the IDs from User Object and display them in the pick list. Any help will be appreciate it! VF <apex:selectList ...
1
vote
2answers
149 views

TEST Class for a SalesForce Trigger error

I'm trying to get code coverage for my trigger for when I deploy my trigger to production. This is my first time trying to provide code coverage to a Trigger in SalesForce, as I'm new to creating ...
0
votes
3answers
63 views

Help with writing test class

I am having trouble writing a test class for this trigger: trigger backToIdea on Idea_Lobby__c (after update) { for (Idea_Lobby__c yourIdea : Trigger.new) { if (yourIdea.Approval__c == 'Approved') ...
1
vote
1answer
95 views

Display list of inner class objects from VF controller

I have the following class, that implements 2 custom inner classes, with a list of one type inside another class. What this does is do a callout to an external REST service, gets back a JSON response ...