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
2answers
34 views

LIMIT Exception handling

I have a custom object Call2_vod__c which is detail to Account. It has a Signature_vod__c field that is in encoded base64 format. Now for one Account I can create attachment from any of the calls ...
0
votes
2answers
20 views

field value contained in list

I have an apex class where I need to check if a field value of a particular record is contained in a pre-defined list. Please find my code here.Can someone please help? Apex class: global class ...
1
vote
3answers
31 views

How to auto-refresh page after Visualforce Error

is there any way to refresh page after an Visualforce error: like 'Unable to lock row' please I need help, i was trying to use window.onerror to reload the page but that doesn't work. so I was curious ...
0
votes
0answers
16 views

UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

The code below is for an API that runs all day long. sometimes I get this error:UNABLE_TO_LOCK_ROW I made some research about this issue and I am using FOR UPDATE in the query but is still happening. ...
0
votes
1answer
43 views

Too many DML rows: 10001(bulk update)

when I try to run the code below I am getting this error: 'Too many DML rows: 10001'. The object that I am trying to update is one of the main object in the org. so it has multiples triggers, ...
2
votes
1answer
50 views

Dynamic SOQL for Cross-Objects

I am wondering if there is an easy way to dynamically query accounts based on the account having the primary FSE name attached to it. The Primary_FSE__c field is on the Installed Product Object, which ...
1
vote
0answers
17 views

Export Test Execution result to excel through developer console/ SFDC org

I just did a Run all test. I want to export the results (all failures and successes) into an excel sheet. is it possible? Thanks.
3
votes
1answer
37 views

problem with sObject as parameter

I get the below error when I try saving CLASS 1 below. The second class that is the problem is also below. I obviously don't understand objects or apex well, so any help would be greatly appreciated. ...
7
votes
3answers
262 views

How to delete a Test Class WITHOUT using eclipse

I cannot install Eclipse, even if I wanted to. It is not approved software for my org. How can test classes be deleted from production, using deployments? There no 'active' checkbox when I am ...
1
vote
2answers
43 views

How to create a hyperlink within a FeedItem using Apex

how can i bring out something similar to " < a href="Https://www.google.com">Search " in the following code. trigger chatterfeed on Feedback__c (after update) { for(Feedback__c ...
1
vote
1answer
67 views

Having issues deploying code 'Too many SOQL queries: 101 '

Hell community, I am trying to push a class and I am getting this error: Too many SOQL queries: 101 for test class(ClonePlus_Test) below is the class ClonePlus_Controller. Can anybody please tell ...
2
votes
2answers
47 views

Class Properties are not accessible

I am new to Salesforce and have what I though would be very simple code. For some reason this is throwing an error: public class GetSet { public class BasicProperty { public integer prop ...
3
votes
1answer
54 views

List has more than 1 row for assignment to SObject

Can anybody help me with this script, this is a simple update when the trigger is fired, (it works in sandbox) What can I use instead of items.values().PO_Details_Ordered__c = ... I am pretty sure ...
2
votes
1answer
29 views

Test Class is not working for Map in class

I am not able to get coverage for the Maps in the class. I only getting 54% coverage and don't know what else to try. Can anyone please help me here. I will truly appreciate it! public with sharing ...
1
vote
1answer
12 views

Can we generate a WSDL from an Apex class

Is it possible to generate WSDL from an Apex class ?? Cause i want to check one request but i don't have the WSDl to check from SOAP UI.
0
votes
1answer
61 views

Error: 'System.LimitException: Too many SOQL queries: 101' [duplicate]

I am getting an error: 'System.LimitException: Too many SOQL queries: 101' when I run a testing class for another class similar to this one, which is located in the same Object. I am trying to use ...
1
vote
0answers
24 views

Compile error for datatype mismatch

Friends, I am getting below error on this line: if(dt.start_date_oapi__c.month()== todaydate.month() && dt.Year_OAPI__c == todaydate.year()){ dt.RecordTypeId = ...
1
vote
1answer
25 views

VF Controller search logic

The following is my controller for my VF page that is going to search for certain Super Customers. On every Account there is a field called Super_Customer1__c, and since Super_Customer1__c will often ...
1
vote
3answers
52 views

How to display an SOQL query in apex Datatable

I'm having a difficult time finding what (I think) should be a relatively simple procedure. I would like to create a class controller that returns a SOQL query and then display the results in an apex ...
1
vote
3answers
70 views

Method does not exist or incorrect signature: [String].getDescribe()

I've checked the other answers and googled alot, cant seem to find the answer to why this doesnt work: public List<SelectOption> AccountIndustryOptions = new List<SelectOption>(); public ...
1
vote
2answers
52 views

UML Class Diagram Force.com Project

Could you suggest me a way to generate a UML class diagram for a Force.com Project?
0
votes
1answer
49 views

Visualforce Page refresh lags current value of search filter

I'm relatively new to Salesforce development and am having trouble with a Visualforce/Apex Class page. The page pretty much works, except that I have a filter which should sort data by date. However, ...
1
vote
0answers
66 views

Search and Edit Records of custom object with Visualforce

i have a vf page and a custom controller . i have fields on page to create a new record in object but i also want to search a particular record in object and want to edit or update its feilds...... ...
1
vote
2answers
236 views

How do you test a class that only pulls data

I'm confused by this. When I was using a dev account it allowed me to create classes in Apex Class like this and deploy it with no problem, but now that I'm using our real account it won't let me ...
0
votes
1answer
25 views

test class Error need yours help [duplicate]

System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record, how to rectify kindly hep me
0
votes
2answers
55 views

I can't execute a simple batch class in my controller

I was about to use a batch class and now I'm stuck cause It wont execute. I don't know why. Here's the code from my controller class: public ConstructorName(){ dispForecastSummary(); } public ...
2
votes
2answers
42 views

Optimize SOQL response time when Where clause references a formula field

I am creating a dashboard, and for example a Formula field will identify if the record has issues. I know that Formula fields are not indexed in SOQL. Can anybody tell what's the best approach in this ...
6
votes
2answers
46 views

Getting the right converted currency in SOQL

What is the right way to get the converted currency in SOQL? I've got this in my query: SELECT Owner.UserRole.Name, Id, Name, Include_in_Forecast__c, convertCurrency(Amount) FROM Opportunity ...
2
votes
1answer
36 views

What is the correct way to check if two dates overlap

I have 2 object. They both have a start date and an end date. How can I check if they overlap? now I have: if((item1.DateStart__c >= item2.DateStart__c && item1.DateStart__c <= ...
2
votes
1answer
33 views

Sync Quote Automatically on record creation

I am trying to get our quote system to automatically sync a quote on creation if it meets certain criteria. (Status, and a couple of custom fields.) I have done some research and found a few places ...
1
vote
1answer
44 views

Apex Test execution Queued

I am trying to run my apex test classes but it has been in queued status for very long time ( 3 hours). Initially I attempted to all test classes - after the while I aborted as it doesnt provided the ...
6
votes
2answers
131 views

Set Contains method is not working correctly after overriding equals() and hashcode() methods

I have created one class name like Test and have overriden its equals() and hashcode() methods and then created its 2 objects like below - Test obj1 = new Test (); Test obj2 = new Test (); and now ...
1
vote
2answers
45 views

De-Reference Null Object

I am reusing some old code here - i've made slight changes but the code itslef is so old it contained the test class within the main class. I have seperated them out but I am getting a pile of errors ...
1
vote
1answer
27 views

Help comparing CreatedDate with a specific Date

can anybody help me with this query, i am trying to get records from 1/1/2014 i don't know how to do the right comparison. I will appreciate any help. Date d = date.newInstance(2014, 1, 1); ...
3
votes
1answer
55 views

Trigger to update sibling records after inserting a new child

How do I update children of the same parent after insert of a new child? For example, if I insert a new Contact with role of 'CEO' for an Account, then any Contact related to the Account with the ...
0
votes
1answer
17 views

After creating managed released package can we create new class or visualforce page?

I have managed released package and i want to create new class and visualforce page in same managed released package. Is it possible?
1
vote
1answer
44 views

Calling an APEX method from a different class

I have a method in one class, but I need to move it out to another class. I'm aware this question has been asked several times already, but I'm getting an error I don't understand. How can I call a ...
1
vote
3answers
42 views

deactivating classes in sandbox

fairly new and have been working out of my sandbox. i have created a couple triggers and i want to deploy to production. problem is my code coverage is only 17%. I have a bunch of testclass in my ...
-2
votes
1answer
62 views

Test class passed, but main class only 44%

Good Morning Salesforce Stackexchange I have the following test class called “DeactivateUsers_Test” which has passed however main class “DeactivateUsers” is only getting code coverage of 44% ...
1
vote
2answers
82 views

Pass value to a class from trigger and assign value to Object fields

I am passing the user.info to a class from a trigger, I am able to get the correct data from the query but I am not able to insert or update the object(User) fields with the data stored in a List ...
1
vote
1answer
81 views

Assign values from List to Object fields

I need to assign values from a List to Object fields (User). I am getting an error "Loop variable must be of type String". I will appreciate any help! Class code: public class ...
6
votes
1answer
484 views

Too many query rows 50001

Can anyone please tell me if there is something wrong with the scrip below. I am using LIMIT 50000 but still getting this error. I will appreciate any help! code: //for mws chart ...
3
votes
0answers
67 views

Override PartnerAPI ClassLoader

We have exported as Runnable JAR (Extract required libriries into generated JAR option) our proyect (which has dependecies the fuelsdk and axis). So, there are some classes which read properties ...
6
votes
1answer
148 views

Creating a class by consuming a WSDL document Schema:attribute

I have a problem with salesforce functionality. I've created flat WSDL file but when I am trying to create class in salesforce I still get this error: Error: Failed to parse wsdl: Unsupported ...
4
votes
1answer
100 views

Custom Button not firing apex class

I need some help. I have created the following button , however when i click on the button i get the following . This is the class, which i want the button to call. Anyone have any ideas why this ...
2
votes
1answer
100 views

What can I use instead of apex:repeat?

I need to find the way to use something different than apex:repeat. to assign the value="{!thousandBlocks} var="block" This is creating multiple tables and i don't want that. Let me explain you, ...
2
votes
0answers
121 views

Response size exceeded 15MB organization limit

I created this class that is requesting large amount of data, I was getting this error:Collection size 1,156 exceeds maximum size of 1,000. And then I found an approach to fix this error, the code is ...
0
votes
2answers
87 views

Retrieve Data from Custom Object in Datatable for a specific Account Id

I am trying to reference a custom object that has a related list on our account page called "SVMXC__Service_Contract__c" and has a child relationship name to accounts of: R00N70000001hzYIEAY. I need ...
1
vote
0answers
48 views

0% code coverage on apex class [closed]

Hope all is well I have the following class (see below), however i am unable to test my logic, as i am getting 0% code coverage.Can any one help me write a test class for the following class below. ...
0
votes
1answer
166 views

How to write a test class that has multiple IF Statements

I created this aggregateResult[] that returns the data I want, as you can see below i store the values in a List, everything works as I want but now I am completely stuck in the test class. I have to ...