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

1
vote
2answers
25 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
25 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
30 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
17 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
21 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
16 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
24 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
44 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
29 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
56 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 ...
1
vote
1answer
65 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
36 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
101 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
48 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
20 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
45 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
66 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
65 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
41 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
45 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
65 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
36 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
32 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
69 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
36 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) { ...
3
votes
1answer
61 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
51 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
31 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
23 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
60 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
86 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
30 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
53 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
43 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
27 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
106 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
57 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
73 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 ...
3
votes
0answers
70 views

Send PDF from Salesforce to EchoSign through Apex REST and EchoSign REST API?

How to send PDF generated from VF page to EchoSign through Apex Code and REST API of EchoSign? I'm getting error as "Content Type not Supported/ UNSUPPORTED_MEDIA_TYPE". Any idea? String ...
0
votes
3answers
73 views

I need help writing a test class

I have written the below trigger and helper class. I am a newbie and pieced the trigger and class together with help from various forms. It works fine in sandbox but I have no idea how to write the ...
-1
votes
2answers
94 views

Too Many SOQL Queries 101 though limit 100 [duplicate]

I am getting this error though limit 100 is provided in SOQL statement.Can someone please suggest a way out here? Apex code: public class Attachments_11{ public List<attachmentCaseWrapper> ...
0
votes
1answer
324 views

Error “Initial term of field expression must be a concrete SObject: LIST” when fetching values from list

Can someone please help me here?I have the piece of code here alongwith the error I am facing. Apex class:Code snippet: Map<Id,Attachment> mapCaseAttachments = new Map<Id,attachment>(); ...
1
vote
2answers
191 views

Pagination in apex

I am getting an error of limit exception in salesforce for SOQL results more than 1000. I need to show 50000 records in a pdf page(may be in different pages). Can someone help me here to do ...
1
vote
2answers
72 views

How to insert list records from one object plus form inputtext box data to a different object?

I have a VF page that List account records that meet certain criteria. The user would select which accounts as well as fill out a couple notes fields (that do not exist in the Account object). Once ...
2
votes
2answers
502 views

Compile Error: Method does not exist or incorrect signature: Test.startTest()

I am experiencing something weird on the Sandbox with all the test classes. whenever I run a test class I get the error: Method does not exist or incorrect signature: Test.startTest(). I am ...
0
votes
0answers
98 views

System.QueryException: Record Currently Unavailable:

I am having issues with one DML operation. This control is for an API that runs all day long, so jquery checks for the size of the list and when is equals to 0 it starts over again. So the page do not ...
0
votes
1answer
64 views

Apex Batch: Query locator failure

I am facing an issue with the querylocator line here. My code snippet as below. global Database.QueryLocator start(Database.BatchableContext BC){ query = 'select Id,(select Name from ...
1
vote
1answer
57 views

SOQL Parent child relating issue

I have to pass a child record's field value while iterating by Parent records. I am getting invalid Foreign key relationship error. Can someone please help me here? Code snippet: global class ...
0
votes
1answer
57 views

Query result optimization

I have a custom object Call2_vod__c which is detail of Account. There might be 100 calls for one Account. I need any one call record with that Account. How should I do the query? Please find my piece ...