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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Apex - Send email to creator of the task when the task Status is “Approved”

I found out that you cannot create email alerts on Task object. It seems that a trigger on task is the right choice. I need to make 4 different email notifications on task, but we can take this one as ...
1
vote
0answers
13 views

Difference between Developer Console and an IDE - hitting error 'System.LimitException: Apex CPU time limit exceeded'

I had 12,000 contacts in my developer org and in the Developer Console, I used a simple Execute Anonymous to delete all contacts. However, I hit a fatal error System.LimitException: Apex CPU time ...
0
votes
0answers
11 views

can anyone please suggest me any good references for Apex coding for Beginners

Please suggest me any good links or refernences for Apex Coding for Beginners.
1
vote
0answers
11 views

Difference between Exception and DMLException

I am inserting an object in Apex which has two master-detail relationships to other objects but as far as I can tell, the permissions on these objects are set fine. When I try to insert my records ...
0
votes
2answers
12 views

How to handle trigger recursion

I have two objects A(parent) and B(child) related by a lookup relationship. I need to update records in object A using data loader. There is an after update trigger on object A which updates some ...
0
votes
0answers
3 views

Enable Chatter Feed Tracking programatically for long / rich field

Is there any way to Chatter Feed Tracking programatically for a field which is long / rich datatype in salesforce.com? I tried to do this using salesforce standard way but was not able to get the ...
0
votes
0answers
6 views

Reload the standard detailed page when child inline vf page is closed

I want to reload the standard detailed page of opportunity when click submit button on the inline visualforce page.
-2
votes
0answers
19 views

how to create test class of the below apex controller, so that it's coverage code should be atleast 75%

@RestResource(urlMapping='/v2/setLead/*') global with sharing class REST_Lead_Controller { @HttpPost global static String createLead(String email,String phone) { List<Account> ...
0
votes
0answers
8 views

Urgent--Need to Get Current Assigned User(Actor ID) from Aproval history

I am trying to use the below relationship query in order to get my final Aproval history data.. Select id, p.ProcessInstance.Status, p.Actorid.p.lastactor.name, ...
0
votes
0answers
12 views

Visualforce an Lightning components

Is their a way to implement a visualforce page into a lightning component? for example call the source of the visualforce page into the component.
0
votes
2answers
26 views

When to use ApexPages.StandardController

I want to know that when to use ApexPages.StandardController in controller. Anyone can explain me with proper usecase. --tia
0
votes
1answer
21 views

How to detect/determine that this parameter ID belongs to this Custom Object

I have linkId = ApexPages.currentPage().getParameters().get('Id');. I want to determine wether what object this ID belongs. Is it Sample1_Object__c ID or Sample2_Object__c ID.. This is a sample debug ...
2
votes
1answer
25 views

Anyway to display Visualforce pages,triggers in dependencies of apex class

Today, i have deleted an apex class without any issues. But, later i configured that the deleted class is used in Visualforce pages and Triggers..That was a disaster for me. Before deleting i have ...
-1
votes
1answer
19 views

Set related partner on opportunities

I need to set the Partner Users on previous Opportunities registered by that partner user. Only designation i have to connect the two is the LeadSource field on Opportunities that lists ...
1
vote
1answer
50 views

Need Help To Simplified Salesforce Formula Too Big to Execute

i need help to simplified my formula field. i have requirement 1 formula field to count Achievement date from opportunity CloseDate based on my client requirement. it compiled too large(5123 ...
3
votes
1answer
29 views

Downloading file from FTP with batch

I need to develop a batch which will download a CSV file from a FTP and insert data in Salesforce.com every day. Is it possible to do that with Apex or an AppExchange please? I search but no useful ...
2
votes
2answers
31 views

Do I need to add every profile to the Apex Classe security?

I am following the trigger framework explained in this image: Link In this case, Do I need to add every profile to the AccountHelper class security? My AccountHelper class does not have with sharing ...
-1
votes
1answer
20 views

Update contact field by all child service [on hold]

I have a Contact and Contract User object. I can create contract user for different service where contract user will contain one contact. Suppose 1 contact have 3 contract user. Following will be the ...
0
votes
1answer
23 views

Record Access Issue on After Insert Trigger [duplicate]

A Community User is trying to create a record in a Custom Object, this trigger autofills the account lookup and the account owner is made this custom object owner as well. Object Level Permission, ...
4
votes
1answer
61 views

Show record type selection screen

One of the requirements for a project is to show a custom visualforce page whenever a user clicks on the New button on Account and skip the record type selection. That part was easy and I could ...
0
votes
1answer
22 views

Error: Methods defined as TestMethod do not support Web service callouts, test skipped [duplicate]

Error occured in my test file:Methods defined as TestMethod do not support Web service callouts, test skipped. @isTest(SeeAllData=true) public class REST_Upsell_Controller_Test { static ...
0
votes
1answer
16 views

Email to Case Attachment Reassign

trigger emailAttachmentVisibleOnParent on Attachment (before insert) { for( Attachment a : trigger.new ) { // Check the parent ID - if it's 02s, this is for an email message ...
1
vote
3answers
48 views

actionSupport rerender not working as expected

I have the below code and I am trying to make the Call_Outcome__c field required based on what value was selected for Type field: <apex:pageBlockSectionItem> <apex:outputLabel ...
6
votes
1answer
69 views

Single SOQL query for Accounts without Contacts

How to query those Account which has not any related Contacts ? I have Queried Account and contact in inner query. I found All Account with that Account I looped and find those Account whose Contact ...
0
votes
1answer
16 views

Chatter on Force.com site.?

I want to use chatter feeds on Force.com sites.Its working fine inside VF page.Force.com its blank. Is there any limitation? Can you please help.? Thanks
2
votes
1answer
22 views

What Is this the correct way of Testing RESTFUL Web Service and How do I increase my code coverage

Below I have a REST API Im trying to test. I seem to have 69% Using the test class I have set up. Is this the correct way of testing my API and if so how do I increase the code coverage here. I read ...
-1
votes
0answers
15 views

Passing value to a method which is called from a modal window [on hold]

I have a page block table which displays a list. There is a jquery modal window which appears on the click of a button which in turn calls a method in the controller. I want to pass the number of ...
2
votes
1answer
15 views

Mavens stopped working - cannot find project file for: myCurrProject

My maven's stopped working last night, and now I'm getting the error that maven's can't find the porject file for my project. Also, I don't see a sublime settings file there either. I may have ...
3
votes
1answer
53 views

Help with architecturing a wizard [on hold]

I'm building a 3 step wizard for feedback in visual force where the user is expected to fill up a form on each step of the page. I'm planning to use one controller for navigation and 3 visual force ...
2
votes
0answers
23 views

Verify org identity for an external request originated in an InstallHandler

During the installation of our package we need to fetch data (related to the installer organization) from a third party system (integration part of our solution). Like stated in the documentation ...
-1
votes
3answers
33 views

Inner Query for lookup relationship is not working

I am trying the below inner query for lookup relationship on Account created for detail__c : http://imgur.com/etqYEPo List<Account> detailObj = new List<Account>([select id, (select id ...
1
vote
1answer
33 views

What should I pass as session ID?

I am using the code here to connect to other org, what should be the input for the session id in line number 42 as below : final String SESSION_ID = resultElmt.getChildElement('???????', ...
0
votes
1answer
25 views

how to write the test class of the following apex class

Here is my apex class, I would like to create the test class of it so that its coverage code must be 100%.Can anyone help me to create its test class. @RestResource(urlMapping='/v2/getUpsell/*') ...
0
votes
1answer
25 views

How to write a test method for apex rest web service class

I am a bit new to development, but I have a apex rest web service class in my org that people can make calls to. However im not quite sure how to write test classes for this class to ensure 75% score. ...
0
votes
0answers
26 views

Unexpected parameter encountered during deserialization

I am trying to write a REST service which will send SF objects between Orgs. Right now, as a test, I am sending data to the same Org that it is coming from. I wrote a GET request which worked so I ...
-1
votes
2answers
28 views

database force commit insert transaction when exception thrown

How do I force my database transaction when a exception is thrown. I am trying to insert a record in finally block but throwing an exception in catch block. try { ... } catch(Exception e) { throw e; ...
3
votes
1answer
55 views
+200

What is the correct way to send DateTime member types in the payload to RemoteActions?

I have seen quite a few questions and answers regarding the conversion and display of a JSON serialized DateTime field in JavaScript and the effects of UTC on that data related to the user's locale ...
0
votes
1answer
17 views

How to create Hierarchy custom settings in Apex

I need to create Hierarchy custom settings in my test class to avoid the seeAllDate = TRUE Little confused on how to create Hierarchy custom settings. Looked at the docs and other questions but don't ...
-1
votes
1answer
36 views

ParentId on Child Record

Ahhh Salesforce, here we go... When creating a new Opportunity record using the Account's related list New Opportunity button, I am able to get the Account Id using "Map m = ...
3
votes
0answers
29 views

Best practice to monitor Apex function execution time/performance?

We have been running on Salesforce platform for just over 6 months with considerate amount of customizations. The data volume has been growing and features have been added into existing codebase ...
1
vote
0answers
23 views

Why is WhoId null for task created by email from Outlook plugin?

I developed a simple trigger to fire before insert on task hoping to capture the whoId for the completed task that is inserted from using the Side Panel in Outlook. I am trying to get WhoId for the ...
0
votes
2answers
34 views

Simple trigger unit test, still getting 0% code coverage

The trigger: What I have been trying for the test class: I am a total noob when it comes to writing these unit tests. I would greatly appreciate any guidance to help me get this figured out.
-1
votes
0answers
24 views

Urgent --Need to fetch Recent Approver(LastActorID) for Approval process

I am trying to get the LastActorId from ProcessInstance object using the Below Query: SELECT id,ProcessInstanceId,ProcessInstance.Status,ProcessInstance.TargetObjectId, ...
-1
votes
1answer
15 views

How do I use picklist values as a number value?

I have a picklist consist of {Low, Medium, High} and I want to use them in a report. But somehow I have to convert them to a number value like {1,2,3} to be able to calculate summary. What do you ...
-1
votes
1answer
28 views

how to update the lookup field default?

I have two custom objects with the fields mentioned below. 1.exam(master object) fields===name 2.task(detail object) fields==amount, emaidid, examname(look up for exam object) exam object have 2 ...
5
votes
1answer
34 views

Summer 15' Unit Testing @testSetup DUPLICATE_VALUE Issues

After wasting an entire day attempting to deploy a huge release to production I'm graveling at the feet of the Salesforce community. So many issues when attempting to package my release (including ...
1
vote
1answer
21 views

How to attach PDF files into an email

We have a visualforce page, we want to make the visualforce page convert to PDF and saved in document and after that we want to attached the body/document as PDF on email. The problem is that the ...
1
vote
0answers
9 views

Depending Field in List with edit mode

I have a list of all open opportunities and the possibility to edit the list. Also I have the depending field recordtype (product) connected with stagename. If I change the recordtype the picklist of ...
0
votes
1answer
7 views

Can i send an email having attachment by providing attachmentId in salsforce Apex class

I have an Id for my Attached File in salesforce, i wanted to know that is it possible to add attachment in Email by using only AttachmentID ? There is a method in SingleEmailMessage class, ...
0
votes
0answers
27 views

Visualforce pdf to save as attachment on a record [duplicate]

I have a button that once clicked it call for visualforce page to render as pdf and save it to a record. Could you help on this requirment. public PageReference attachPDF() { Attachment ...