A proprietary Java-like programming language for the Force.com Platform.

learn more… | top users | synonyms (1)

0
votes
2answers
13 views

how to call private method in test class to acheive code coverage

//Method returns last date of fiscal year private date getFiscalLastDate(){ Integer currentFY; Integer currentFYMonth; Integer CurrentFYDays; Date today; Date ...
2
votes
1answer
13 views

Use fields from WhatID object in Email Template

I have apex code that sends out emails using templates. The code sets the RelatedTo id as a contact, and the WhatID as a custom object which is a child of contact. Sometimes the child object is a ...
0
votes
1answer
13 views

How to map custom Names field on lead to create as new contacts when lead is qualified

I have created custom name, email, phone fields on lead apart from standard name email and phone fields. I want, when lead qualified and converted so it should be created as new contact under the same ...
0
votes
1answer
10 views

unexpected exception: prcieBookBasedOnMarket: System.StringException: Invalid id: id: External entry point

i am getting this error, in the last for loop how i can get the market of the ownerId for an opportunity. where market is a custom field in User, we are trying to compare market of the user to the ...
1
vote
1answer
16 views

How to Pass List as parameter in REST API

I have a requirement where we will receive a parent product id and List of childProductInfo from other system. Our task in SFDC will be to find the existing parent product (1st input parameter : ...
0
votes
0answers
19 views

Upload a file from VF into Salesforce REST API

I am quite new with REST API, I want the following form to not only create an account, but also upload the file selected in the form as an attachment (this file could be a PDF, image or doc). I have ...
3
votes
1answer
27 views

If order of getters is not predictable, how to increment a counter to track total

Background: New users need to complete a series of training exercises. We have been manually validating that these are completed. I'm now working on a 'validator' visualforce page that will check if ...
0
votes
1answer
30 views

To display two fields from two different objects in a single column of a table & creating new records with the help of them

i am trying To display two fields from two different objects in a single column of a table & creating new records with the help of them. actually i am trying to create a customize product line ...
1
vote
1answer
38 views

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

I am getting this error when I am running my visualforce page Below is my apex extension class: public with sharing class ExtensionAccount { public ...
0
votes
1answer
13 views

Test Site Login [on hold]

I need help to test a class with this code: public without sharing class POAlterarEmail { public Boolean verificado { get; set; } public Boolean flagErro {get;set;} public String erro ...
2
votes
1answer
45 views

Apex error: Unexpected token: Map

I am trying to get recordType Id's without using a SOQL query (source codespokes.com: how-to-get-record-type-id-without-soql): // User need to pass two parameters SObject Type & // RecordType ...
0
votes
1answer
25 views

Apex or Formula Fields - Comparing strings

I have to extrapolate the string's portion 'other text' for both string s1 e s2. String s1 = 'Ranger Rover, other text'; String s2 = 'Range Rover Sport, other text'; How can I verify that the ...
2
votes
1answer
34 views

How to use set<ID> in where clause for text field - no results found

I am Using a simple Soql Query Like below: Set<Id> Testset = new Set<Id>(); List <BR_Channel__c> channel = [select id, BR_District__c from BR_Channel__c ...
0
votes
0answers
37 views

Issue with Pagination for Wrapper Class

i have built a pagination for wrapper class,my requirement is after clicking the next link the previous link will activate , similarly when i will be on last page the next link will be deactivate. my ...
0
votes
1answer
18 views

getting error while Deleting checked rows using apex in Salesforce

I am deleting rows based on checkbox click.But when i select a checkbox and click delete , i am displayed this error " DML statement found null SObject at position 0 Error is in expression '{!del}' in ...
-3
votes
0answers
28 views

sending email from apex [on hold]

public PageReference sendingemail(){ Messaging.SingleEmailMessage semail=new Messaging.SingleEmailMessage(); string[] sendingTo=new string[]{'sahityaraghavreddy@gmail.com'}; ...
0
votes
1answer
17 views

How to check is Price Book added in the Opportunity or not in, Apex class, Salesforce?

Description : I am overriding the functionality of Add Product button through code (which is present in related list of Opportunity, in Opportunity Line Item.)...i need to check is Price Book added ...
0
votes
1answer
20 views

Deleting a Shared Record using Apex Sharing

We have a requirement where a particular record of an Application object should be shared to either an assigned representative or a Sales Manager. These are two fields which are created on Application ...
1
vote
2answers
36 views

How do I check CRUD and FLS in apex?

Please help me solving this Issue. I'm new to the salesforce, I worte an Controller which do get list of objects values from contact, Cases and also inserts New cases and Case comments to, During the ...
0
votes
0answers
26 views

Customize Search message

I have created below Page for autocomplete search on User object. I need to customize the search result message which I am unable to understand from where it is showing. Can someone help me here? ...
0
votes
1answer
16 views

Test class for controller class? [on hold]

I have write this class in Salesforce but not able write test class. Please anybody can help me to write test class. This is my controller class: public class AccountRelatedContacts { ...
0
votes
1answer
14 views

Autocomplete functionality in text box by JQuery

I need to keep an input text where , when someone writes text (say initial 'a') all User's name in salesforce starting with the initial will come in drop down. Currently my code showing only logged in ...
-1
votes
2answers
26 views

get the value of a field in the pageblocktable

I called the value of the field with this code <apex:column headerValue="Teacher" id="tname" value=" {!schedule.tlname}, {!schedule.tfname}" /> now how can I get the value of ...
0
votes
1answer
7 views

Calendar invite not showing up on the home tab

I am creating an event using trigger and I'm also creating an invitee using the EventRelation object. When I go to that particular event, the invitee is shown on the list but when I go to that ...
0
votes
1answer
17 views

Compatible Schema.DisplayType For SObject Put

I'm trying to write a method for working with sObject.put(field, value) statements in a loop where the Schema.DisplayType of the fields received varies. The goal is to have the method return the name ...
1
vote
1answer
23 views

Multi select Picklist and Visualforce issues

I am trying to display picklist values from a multi select picklist from a related object. I am using a visualforce page and putting this in the record detail. VF Code: <apex:page ...
0
votes
0answers
18 views

Creating a rate table in Apex [on hold]

We sell insurance. The cost of that insurance is dependent upon what age bracket you fall into. I have access to PHP code that already created this functionality so I can easily transfer the code. ...
0
votes
1answer
17 views

Inserting Multiple Records into a custom object which has a reference to another object

I have the following REST webservice for inserting multiple records into a custom object Tickets. @RestResource(urlMapping='/MultiTicket/*') global with sharing class MultiTicketRestController{ ...
1
vote
1answer
29 views

Issue with buttons with apex

I have the following visualforce page: <apex:pageBlock> <apex:pageBlockSection> <apex:pageBlockSectionItem > <apex:outputLabel value="Convert ...
2
votes
2answers
23 views

Converting Apex Trigger to a Class

Please excuse any misstatements or blunders in my comments as I'm VERY new to Apex development. However, I've found code for a trigger that allows me to copy/clone attachments from a custom object ...
0
votes
1answer
20 views

Controller Extention returning null value

Below is my controller extention code. i am getting null value for acct.Owner field. Dnt know what i am doing wrong here. And how can i filter record value like, return only that record 'where ...
1
vote
0answers
35 views

accessing related lookup in SOQL query

Hi I am writing a SOQL query. I use Fuse IT to check my SOQL queries. So the Query is: Select Id,Name,Material__r.APS_Account__r.FirstName, Material__r.APS_Account__r.LastName from Material_Order ...
1
vote
0answers
25 views

Using Javascipt to Create SelectList Dependencies in a VF Page

I am trying to code create dependent Picklists out of 2 apex:SelectLists on a Visualforce page. I have a junction Object called Service_Transaction_Type__c that creates a many-to-many relationship ...
0
votes
0answers
36 views

We have multiple triggers on an object,how to findout one trigger is in use or not [on hold]

We have multiple triggers on an object.We have one requirement,How to find out one trigger is in use or not eventhough it is active .Please help me on this.
-1
votes
0answers
41 views

APEX SOQL query

I have bunch of contracts, get only latest agreement for the contract in one SOQL query. How to do that ? Agreement object has lookup relationship with Contract. Contract can have multiple version ...
1
vote
1answer
25 views

ant deploy error - Maximum size of request reached

I used to deploy metadata using ant migration tool successfully but from last night I am getting the below error: John@John:~/mm_workspace/TEST_Project/deploy$ ant deployUnpackaged Buildfile: ...
0
votes
1answer
18 views

email notification not sent to queues once lead is created or edited

Queues are not getting email notification if a lead is created using new button on lead page or if leads are edited.Lead assignment rule runs correctly but it is not sending mail.Lead is assigned to ...
0
votes
1answer
28 views

Apex test method for wrapper classes

I looked at these existing questions but they didn't answer my specific case: Writing test code for wrapper class Writing Test class for Wrapper Class in my controller I have the below code which ...
0
votes
1answer
27 views

How to edit multi picklist after “after update” trigger runs?

I am running a trigger after update. It looks at a multi-picklist for the values. Once done, I want to reset that multi-picklist to null. How to do this?
0
votes
0answers
33 views

Why does this code keep refreshing in an endless loop?

I am trying to put the user in edit mode with a specific recordtype. If I paste the URL below in a browser it works. When do this it keeps trying to access the page as in an endless loop. ...
0
votes
1answer
11 views

Error: Compile Error: Invalid bind expression type of OpportunityLineItem

i am getting this error in lin 12, how to pass multiple product code using list, can anyone please help me out. Error--Error: Compile Error: Invalid bind expression type of OpportunityLineItem for ...
3
votes
0answers
16 views

Inbound E-Mail has problems with utf-8?

I have a problem with an inbound E-Mail. In my Apex code I just use the following: global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, Messaging.InboundEnvelope env){ ...
0
votes
1answer
19 views

paginate a wrapper class

I want to paginate a wrapper class such that when i navigate from one page to another the slected records dont get unchecked in previos page. This is my requirement. i have build only few part, please ...
1
vote
1answer
30 views

Trigger to add active user with standard profile to public group

trigger wen user record is inserted/updated..check if user is active or not.. profile should be standard user..and if both conditions meet..then add user to a particular public group trigger ...
0
votes
0answers
12 views

Able to make isactive = false for such users who are manager of some other users

I am able to make isactive=false for such users who are manager of some other users.As per salesforce funtionality i should not be able to make isactive=false using DML as it will throw dependency ...
2
votes
0answers
44 views

Issue with updating custom object with parameters from Lightning App

I'm new to salesforce development. I've developed a lightning component from which i need to insert or delete a particular entry on clicking a checkbox. Delete if the entry exists already and insert ...
0
votes
2answers
15 views

Record access during Manual sharing

This might sound very basic but I was not able to find the right documentation for this. Suppose I have a record whose Owner is X. Once X fills out the record and saves it, the record type changes ...
0
votes
1answer
8 views

Test Class to cover Class TeakUtility

I have Class and I want cover the code coverage Following is the class: public class TaskUtility{ public TaskUtility() { } public static string createTask(String Subject, Id ...
5
votes
1answer
298 views

Why is String.valueOf(Blob) different that Blob.toString()?

I am working on a REST Service that will desiralize the request body and interpret it. My understanding was that calling String.valueOf(objectInstance) would just call objectInstance.toString(). ...
0
votes
1answer
34 views

How to get the Sum of Length of Body Documents

How can I get the sum of all the length of select Options document I only want the value of the Selected Documents. docNames = new List<SelectOption>(); for (Document d : [ SELECT Id, ...