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

3
votes
2answers
59 views

I am getting this error: System.LimitException: Too many SOQL queries: 101

I am getting this error System.LimitException: Too many SOQL queries: 101 when I run the class bellow. It seems like it is affecting all the triggers linked to NRProducts__c Object(This object has ...
1
vote
1answer
20 views

Can we create report folders through Apex

I like to create a report folder via Apex trigger/class is it possible. Thanks in advance
2
votes
2answers
88 views

JavaScript doesn't work with Apex command Button

I was able to get the id of the button but no able to get the outputText id. Please help <script > function exButton(){ var remainingValues = ...
0
votes
0answers
35 views

Apex Batch that triggers class code

I have this class that implements an API, right now this class is linked to a SF Page with a button, I was wondering if it is possible to make this process automatic without any human interaction (as ...
5
votes
2answers
41 views

DML not allowed on ApexClass

I am trying to move around 80 classes and visualforce pages from sandbox to production by using change set but i got an error One or more components failed Version Compatibility Check. This ...
3
votes
2answers
44 views

Problem getting the right Id from the SOQL Query

I having a problem getting the ID of the entity company selected from the dropdownlist. The value passes correctly to the class, but the SOQL query is returning the ID of the Company.com-KY even if I ...
9
votes
2answers
94 views

System classes are being shadowed by my Apex classes

When I create a class called Process it looks like I'm experiencing class shadowing. For example: public class Process { //... } The existence of the above class prevents me implementing the ...
1
vote
2answers
68 views

Solved! Update Salesforce records from .Net(c#) based on SQL query

I need to update some Salesforce records from .Net(c#) based on the SQL query. Below is my table (vendors in sql). I need to update Salesforce Object(NRProducts__c) with the data in the SQL. The ...
0
votes
1answer
55 views

Am I testing everything in my test class?

I'm trying to get an idea as to whether there is anything I am perhaps missing from my test class? Here is my apex class: if(null==new_user) { return doErr( 'new_user cannot be null. ...
4
votes
1answer
80 views

How to save a universal value in a Salesforce Instance

I need to save a value in a Salesforce Instance which should be universally accessible (In VisualForce Pages, Apex Classes). An example would be to save the account ID to link all contacts (from the ...
0
votes
1answer
35 views

Having trouble calling a webservice method from apex test class

I have an apex class, which is the first block of code below. I'm trying to have a test class create the lead, and use the leadrotator class, but I keep getting the "Save error: Method does not ...
1
vote
0answers
41 views

Help understanding Web Service Callout Reponse

I just created a web service using wsdl2apex, I am getting the response but I don't know if this response is right, what I mean is if already parsed, if so how can I get the values (VendorId, ...
0
votes
0answers
62 views

Help with Salesforce API getting values from web service (VS C#)

I found an API to update fields in VS C# from Salesforce. But I can not figure out a way to request values from the web service(GetVendorService) and store them in a list, so I can display the values ...
1
vote
2answers
51 views

I have problem displaying List<String> values in a repeat and no show duplicate values

I can display values from a List in VF Page 'repeat', in the System.debug() the list is displaying the values. I have two question: why my vf is empty and also is there any way to NO show duplicate ...
0
votes
1answer
35 views

Mobile App Salesforce Sync

I have an mobile app which can work offline. What i need is a guidness. I need to insert my object which already created on my mobile device, to salesforce WITHOUT smartstore. Can you please show ...
-1
votes
1answer
68 views

Help summing columns in a datatable

I am creating a PDF report which has 3 columns productId, SupplySize, and qty. I would like to sum the qty depending on the SupplySize. and display the values somewhere outside the table. This will be ...
1
vote
1answer
40 views

Which Apex classes in org are Salesforce Communities-related?

How to find out which Apex classes, Visualforce Components and resources within the organization are Salesforce.com Communities-related? In other words, how to find out which files in the project are ...
1
vote
1answer
43 views

Is it Possible to access SDK From Static Resource?

If I have a SDK in .jar file can I upload it to Static Resource and call it in Apex Classes. As per Documentation it says I can able to call ".css" , ".Js" , ".Jar" Files in VF Page.
1
vote
1answer
55 views

'for loop' repeating the first row of a table

I have a table and I am using a for loop to get the values of the rows but this loop is duplicating the first row, I must be a easy fix but I already tried all I know. I will appreciate your ...
0
votes
1answer
55 views

Help getting values of selected rows from table(no using Javascript)

I have a table that displays the ChildObject of the current object, when I click on a button it sends me to a VF where i can see the ChildObject in a table and I have a checkBox in every row, It works ...
2
votes
2answers
123 views

What is Interface method in salesforce

I have a very simple doubt regarding this Interfaces in sales force, Actually what it says is "This class will have a method but the body will be empty. And body for this method will be provided in ...
1
vote
1answer
62 views

How to update an object from a VF Page using a Button?

Is it possible to update an Object from a Vf page while pushing a button. We have this Object (Products) and it has almost 500 fields and some of the triggers are fired when the object is updated, ...
5
votes
2answers
86 views

Test classes with Developer Console

Is there any way of solving this bug? Basically, whenever I try to run a test (Username > Developer Console) I can run the tests and all but when I get to the part where I want to check the red & ...
2
votes
2answers
81 views

Solved! Get value from one query and use it in other query

This class allow me to get the bundleItems where the bundle_c matches the ProductId, I need to get the QtyOrdered from the List values and somehow multiply the QtyOrdered by Qty_c. I am populating the ...
5
votes
4answers
237 views

SOLVED! Multiplication in SOQL

Is it possible to multiply this values, something like this: Qty__c * NRPrice__c in the query below PODetails2 = [SELECT Qty__c, NRPrice__c FROM o_Bundle__c ]; or I have to do it in the VF page ...
1
vote
1answer
80 views

Getting Child and Grand Children records Query

I would like to get all the records related to a parent which includes the children, grandchildren, great grandchildren etc. What is the best way of writing such a query? The end goal is, I am trying ...
4
votes
1answer
70 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 ...
4
votes
1answer
172 views

Error: Compile Error: Invalid bind expression type of SOBJECT:Purchase_Order_Details__c does not match domain of foreign key at line 19 column 77

I just started programming in apex, so I will appreciate your help in this case. This class should allow me to get the bundle_Items from bundle object where Bundle__c =(Here is the result of the ...
3
votes
1answer
60 views

Class for Create Contract

I have created a new Apex Class called by a custom button that copy some field values from a opportunity and creates a new contract object with this information. I am trying to check if the ...
2
votes
1answer
95 views

Error: mail.setToAddresses unexpected token ')'

I'm following a Batch Apex Class workbook example. In the section that sends an email to the job's submitter, I'm unable to set any values for email variables. At this line: ...
0
votes
1answer
63 views

How do I query a List in a Class?

I'm building a class to lookup all of a Contact's Interaction_c records. Using a Contact.Id value, I'll populate a List of all Interaction_c records. When I have all of the Contact's records I want to ...
18
votes
2answers
224 views

Inheriting non-implicit constructors on Apex classes

If I have an abstract parent class like this: abstract class Vehicle { public Vehicle(Person driver) { // } } and then I create a child class like this: public class MagicCarpet ...
4
votes
1answer
165 views

Return Name of class from instance of that class

I need a quick approach to something like: MyClass mc = new MyClass(); String theName = ClassNameProvider.getName(mc); // returns 'MyClass'
1
vote
2answers
73 views

Removing a class from Production

I'm having a peculiar problem with a class in production. The class is this one: https://github.com/907pine/NWHRN-sandbox/blob/master/src/classes/TrialCustomerPortalHomePageController.cls and I have ...
3
votes
1answer
34 views

Why does my unpackaged Apex class have “packageVersions” XML tag and a namespace in IDE

ZenDesk is a third party customer support tool that integrates with Salesforce.Because they had a bug with their customizations, I wrote a scheduled class that went into their custom records after ...
1
vote
2answers
391 views

APEX test class - “Constructors Can not be static”

I have a Trigger that creates a record in a custom object ("Services__c") when an Opportunity is marked as "Closed Won". Once closed won, a new Service record will be inserted, and: Service Record ...
0
votes
0answers
50 views

Need to redirect login page of salesforce based on instance and SLAM SSO

Box was integrated into salesforce and SSO is not enabled yet. But the requirement is to write a class with VF page 1. to identify the salesforce instance (1st step) Check weather SLAM sso is ...
4
votes
1answer
107 views

Exclude properties from Apex class when serializing to JSON

Is it possible to delete class properties dynamically in Apex Example: public class BananaHolder() { public boolean isRipe; public boolean isDelicious; public integer ...
2
votes
2answers
183 views

Get the caller class name in apex without passing parameter

I have three class namely A,B,C and each calls other class methods. Now my problem is getting the caller class name in called method without passing parameters to the called method. Is there any way ...
2
votes
1answer
193 views

Calling Google web app from apex class

I have a Google script which takes address in the url parameters and returns the latitude and longitude. It is deployed as a web app. Link : ...
1
vote
1answer
4k views

getting System.NullPointerException: Attempt to de-reference a null object

in Execute Anonymous, executing the following code to test the class: List<Contact> contacts = [Select c.Territory__c, c.Sub_county_Code__c, c.Student_Type__c, c.Domestic_Or_International__c, ...
0
votes
1answer
209 views

Adding inner Apex class causes “Compile Error: The configuration of your org has changed, please reload the page. Missing dependent object”

After adding a new inner class to a controller I get the following error when trying to save. Compile Error: The configuration of your org has changed, please reload the page. Missing dependent ...
0
votes
2answers
1k views

Scheduled Job does not execute. Though shows in GUI

I have a scheduled class that is seen and setup within the Gui. Setup->Monitoring->Scheduled Jobs It is set to run everday at 6PM. It shows started and next scheduled run. However, I started it over ...
6
votes
3answers
573 views

Difficulties with Appleman's Trigger Classes

I'm working on a major project that has numerous triggers creating new records on 4 objects while also syncing updates back and forth between 3 of the 4 objects. The new records are primarily created ...
0
votes
3answers
398 views

How do I reference or use a class within another class?

I would like to use the method from one class within a completely separate class. What code would I use to import the other class? Class 1 public with sharing class HelperClass { public ...
2
votes
1answer
176 views

Contract / Warranty Creation from Asset

The code I am attempting to fix today revolves around Contracts and Customer Assets. The idea being that when a customers asset is generated or updated the account manager will check off "Support ...
4
votes
2answers
62 views

Can someone recommend a solid option to help me “get my feet wet”?

I've been interviewing with a company that uses Salesforce as their CRM. I'm a sales professional and have had to use Seibel before but never salesforce. I am hoping someone could supply me with a ...
1
vote
2answers
648 views

Trigger Hel(p) Code Coverage 0%

As a followup to my previous posts (Again, many many thanks) I am still having trouble with the trigger. The code seems to function and I created a test class and the code itself is 100% covered. ...
2
votes
2answers
296 views

Help with Triggers / Classes for Case Creation Part II — Test classes

Thank you for all the help on my other question. I was so happy to see a community that doesn't have trolls. So the good news is that the code compiles with no errors. The bad news is that I have ...
1
vote
1answer
247 views

Help with Triggers / Classes for Case Creation based on Field Change in Customer_Asset

I am new to Salesforce and haven't coded in quite awhile, so please forgive my rookie mistake(s). I am attempting to write a trigger to do the following: Our company manufactures equipment that ...