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

learn more… | top users | synonyms (1)

0
votes
0answers
12 views

Trigger for counting child records via roll up summary relationship

We have a Destinations object which is linked to Supplier products object via a lookup relationship. There are two types of supplier products(marketplace and curated) We want to count the number of ...
0
votes
0answers
5 views

Salesforce to Salesforce connection using Apex, Callouts and SOAP APIs

We have continuous need to move some configuration related data from Salesforce Sandbox to Salesforce Production environment. End users are not comfortable with using data loader and need some simple ...
0
votes
0answers
5 views

How to write test Class for Batch Apex Status Bar

I have one vf page which will show the status bar of Batch Apex, but I'm not able to Cover the Class in my test class. Any kind of help is highly appreciated. public class batchJobs{ public ...
-1
votes
1answer
6 views

Apex Error: INVALID_FIELD, No fields provided in an external foreign key reference in entity: Account: []

I'm writing a test class for an Apex Trigger and I keep getting the error, "INVALID_FIELD, No fields provided in an external foreign key reference in entity: Account: []". I have been trying to ...
0
votes
2answers
14 views

Test Class for HTTP Callout getting Zero Code Coverage

I'm trying to write a test class for my HttpCallout. The code is working, but I'm having trouble with the test class. I've tried to use the MockHTTPResponse, but I'm still getting zero code coverage. ...
-1
votes
0answers
21 views

Before Insert Apex Trigger

Need some assistance with creating a Before Insert Apex Trigger for the following below. I am not proficient with Apex and I don't know where to start. Thanks ! If uses Transit is Yes, Transit Annual ...
1
vote
0answers
21 views

dmloptions trigger - test failing

I'm attempting to create a case trigger to enable auto-response rules to be kicked off when inserting a case via the API. However, my test class seems to be failing. Anyone have any ideas why this ...
1
vote
1answer
14 views

How to call controller method inside the tab panel in visualforce page?

How to call controller method inside the tab panel in visualforce page? I am trying to call my controller methods like shown below but this dosen't work. Below are the codes from my VF page and ...
2
votes
3answers
26 views

Rollup Field on Custom object from Standard Object

We currently have a custom object called 'Buildings' then under that we have our Accounts (Standard object) & Opportunities (Standard). We are trying to calculate the total 'Closed MRC' (Monthly ...
-1
votes
1answer
19 views

Getting Response size exceeded 15MB organization limit on VF page [duplicate]

I am getting the Response size exceeded 15MB organization limit error when i clicked a button from VF page which is not able to trace in debug logs and the debug log as follows: Number of SOQL ...
3
votes
0answers
28 views

Functional programming utilities in apex

I've heard that in javascript world there is an emergent ecosystem of functional libraries (like lodash, rxjs but also es6 promise) and also in the java world (guava or Java8 with lambdas). Is there ...
6
votes
2answers
78 views

Retrieving records from @testSetup Method

I'd like to create records in @testSetup for my Test Class, to avoid the need to create the same records for each of the methods in the class. I also need to create both a User record and Custom ...
2
votes
2answers
366 views

What does this code do?

public String postal {get; set {postal = value == null ? value : value.trim(); } } please explain about this line
4
votes
1answer
43 views

Adding a Link to a Field in a Field Set?

String queryFields = null; for(Schema.FieldSetMember field : SObjectType.Task.FieldSets.Activity_Detail_Page.getFields()){ queryFields = (queryFields == null ...
1
vote
1answer
15 views

Trigger on history tracking object

I have history tracking enabled for a custom object. Can I write trigger trigger on the new History tracking of my custom object? I am not getting such example from google nether do I get somewhere it ...
2
votes
2answers
30 views

How to write test class for Schedulable class

global class ScheduleBatch implements Schedulable { global void execute(SchedulableContext sc) { BatchArticleUpdateCase batch = new BatchArticleUpdateCase(); ...
2
votes
0answers
15 views

Opportunity Split Using APEX and Visulforce Page

Has anybody developed Opportunity Split and Opportunity Overlay functionality using APEX and Visualforce page ? I have developed but the problem is I'm using wrapper class inside it so it taking more ...
1
vote
2answers
48 views

Too many SOQL queries: 101 - Test Class w. no queries / DML inside loops

I have a trigger which contains several Ifs, populating my record's fields with different values, depending on which picklist value has been selected. So I need to test Inserts & Updates of ...
2
votes
1answer
16 views

Is it possible to modify outgoing emails via Apex?

Is it possilbe to modify outgoing email message from Apex? I mean capture all outgoing emails (coming from SF standard features, like Mass emails or single email sent via Activity) and modify them ...
1
vote
1answer
18 views

Protected method is not visible in child class

I am trying to test protected method but it showing error "method not visible". In test class when i am calling parent protected setvalue method its giving error, it would be also helpful if anybody ...
1
vote
1answer
38 views

Update record based on checkbox

I have below page where I can show different records under different sections based on their record type. Now I have to update only those records where User checks checkbox Confirm_Attestation_abv__c ...
1
vote
1answer
14 views

insert related records while adding bulk records using batch apex

I am trying to import CSV file into salesforce which has almost 200 records. I need help while inserting related data in loop as i don't want to use insert query in loop. So generally to bulk insert ...
1
vote
1answer
26 views

Does deep cloning also create new parent record?

I am running below code Account a1 = new Account(name='a1'); insert a1; Account a2 = new Account(name='a2', parentId = a1.id); insert a2; Account a3 = new Account(name='a3', parentId = a2.Id); insert ...
2
votes
2answers
71 views

SObject row was retrieved via SOQL without querying the requested field on Contact.Account

I am getting this error: SObject row was retrieved via SOQL without querying the requested field: Contact.Account Controller: public class WrapperAccountCtrl { public List<Account> ...
4
votes
2answers
38 views

Visualforce PDF with dynamic header footer. but Cover Page should not have header footer

I need help in making cover page of PDF different without any header/footer. Rest I was able to complete but how can I remove header/footer from first page that can be used as cover page. <style ...
2
votes
0answers
31 views

OAuth1 and Moving from SHA-1 to SHA-256

Today our Java middle-ware communicates with our SalesForce.com app via OAuth version 1. Will it still work after the upgrade to SHA-256? Should I upgrade to OAuth 2? Appreciate any help. Update ...
1
vote
3answers
50 views

Unable to save the record using default save method

Here is my below code and I have a simple default save as shown below and when I click the save button it does not throw me error and it does refresh the page but I do not see the data being saved.. ...
3
votes
1answer
43 views

Bulk API Session ID

I have a trigger on a custom object which on certain conditions call a future method. The future method calls a Salesforce REST function. This rest function calls a PDF VF page, stores the body as an ...
1
vote
1answer
38 views

rerender input file losing file.?

I am rendering <apex:inputfile> by adding a new row but I am losing file when I click add row button. I am able to add a new row but the path is lost. Please help! <apex:repeat ...
3
votes
2answers
43 views

Parse apex class using another class

I want to create something like a Java doc but for apex. So it would parse through classes, pages, components, etc and pull out things like soql and sosl statements, classes it relies upon, objects it ...
3
votes
1answer
105 views

Is there a serious bug in Salesforce Apex Compiler?

I needed to save a piece of code viewstart = Datetime.newInstance(Date.today(), Time.newInstance(0, 0, 0, 0)); But by mistake entered viewstart = without even a semicolon it got ...
2
votes
1answer
19 views

Attachments are not displayed in a Pageblock Table

I have a visualforce page that will display the attachments from A custom Object based on the Current logged in Portal user AccountID and ContactID. The custom object is Child(LookUp Rel) of Account ...
1
vote
0answers
30 views

How to display multiple selected Contact to base page

I have one event page which Which has standard field "Name" which is lookup to Contact and Lead, for this "Name" field I have custom multi select Contact vf page. This lookup page will return list of ...
3
votes
2answers
72 views

How to avoid governor limits on soql query when you need an extra query for each record?

I have a little problem. We have 2000 records of type "Immobenutzer". So now I am facing the problem of governor limits. I need to log the logintimes for each user. So for each user there has to be a ...
-5
votes
0answers
15 views

APEX code for accessing users

iam new for salesforce.com , i want to create one visualforce page having all users and profiles using apex code <apex:pageBlockTable value=....> ...
2
votes
2answers
17 views

Pagination Sorting with jQueryDataTables rerender problem

I found the javaScript jQueryDataTables for pagination and sorting. I add the code and the javaScript to my org and visualforce page. If I open the page for the first time, the script works fine, but ...
0
votes
3answers
29 views

Just a quick bit of APEX Test Guidance

I have a class and a test method. When trying to deploy I get the following error This is the class: global class ClientAllocation { WebService static List<Account> getAccount() { string ...
4
votes
1answer
60 views

Apex Complie code Error: Variable val does not exists

I am having a problem in code it giving me error Variable does not exist: val at line 14 column 25 I am sharing my code public class UtilityClassCtrl { public Integer val{get;set;} ...
1
vote
2answers
30 views

How to pass value from method to controller

Controller: public void geterp(string nicpn){ // local variables String Accountcode; Quote__c quoteWithAccountCode; Quote__c ...
0
votes
1answer
14 views

Reply on Email2Case - populate TO field

I am currently setting up email handling using Email2Case, when I click on "reply" in my email related list on Case I would want the field "TO" populated with the email address of the original sender ...
1
vote
2answers
29 views

Fetching Record Type Name / Id values from Custom Settings - best practise

I need to check that the Record Type of the record whose change caused my trigger to fire is listed in a Custom Setting WEID__c. Until now I have been been using trigger WE_MRFv2 on Opportunity ...
-1
votes
0answers
7 views

Consolidate all Custom Object's Truncate Button in One VF Page

I have a requirement of having a VF Page where on selection of custom objects I need to delete all its records in that Org. Which option would serve better - Apex Class / Batch Apex, to avoid ...
-1
votes
0answers
19 views

I am getting an error 220 [on hold]

It says that "Your credentials do not allow access to this resource" I am trying to get the tweets. thanks
2
votes
1answer
19 views

Visualforce Custom Component input Variable(attributes) multiple initialization issue..

I hope many of you have faced this issue already. So, interested in knowing the root cause of the problem. Page: <apex:page> <apex:form> <c:sanTestComp2 ...
2
votes
1answer
34 views

Callout from triggers are currently not supported.:how to get token from web service in trigger without storing it in any object

I was writing a trigger to send email . after inserting a record i was getting an id of that record in trigger. Using this trigger i want to get email id from external webservice. trigger sendEmail ...
-2
votes
0answers
16 views

How to allow multiple selection of Custom lookup record selection? [on hold]

Please provide the Custom lookup Multiple records selection code to my mail id::vijju71 gmail.com Thanks
3
votes
3answers
39 views

Issue with Jquery DatePicker in Visualforce page

I have been facing an issue with the usage of datepicker in my VF page. VF page: <script> jQuery(function(){ var $j = jQuery.noConflict(); ...
2
votes
0answers
33 views

Salesforce apex Inbound SOAP web service response

My requirement is that I have to create an inbound SOAP web service which will return a list of data based on the input parameters. I am using wrapper classes to build the output. global class ...
3
votes
1answer
35 views

How to get Map collection out of a list?

I currently have a multi-demensional map/list object that is defined like this: Map <Id,List <Map <Id,Custom_Inventory__c> >> complexMap = getComplexMapObject(); The object was ...
4
votes
2answers
25 views

Failing test is showing as passed

In Debug Logs I can see a System.NullPointerException for the unit test that was just run, but on the Apex Test Execution page I see the test as passing. The error is not buried within the log ...