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

learn more… | top users | synonyms (1)

0
votes
1answer
14 views

Breaking out of nested loop without repeated data

I'm trying to loop through 3 nested loop. To retrieve product Id, I need the first outer loop. To retrieve the specific product based on the product Id, I need the second loop. Finally the last loop ...
1
vote
1answer
22 views

System.DmlException: Insert failed. first error: REQUIRED_FIELD_MISSING, Required fields are missing: [AccountID__c]: [AccountID__c] line 49

I'm trying to CREATE or UPDATE an SOBJECT "AccountProjectEngament__c" this following code works on my sandbox, but i can't upload it to my production site. i have the following error: ...
4
votes
1answer
77 views

How do I use Apex to create a comma separated list of strings without a trailing comma?

I am having a list of String letterString List<String> letterString = ['Jan', 'Feb', 'Mar']; Below is teh output I want : String outputString = 'Jan,Feb,Mar'; This is what I have done ...
2
votes
1answer
24 views

how to get all fields from any object and its parent object in apex?

I have tried this code but i am only getting particular object fields but not its parent fields. any suggestions what i am missing? public with sharing class FilterCriteriaComponentcontroller { ...
0
votes
1answer
13 views

Dynamic Filter to query from visualforce chart

I have one requirement. I have to create dynamic report on task object, dynamic in the sense i have to get users name in a drop down list and if i select any user and click on "get report" I should ...
0
votes
1answer
17 views

How to get Contact Id from URL

I am having a Standard object Contact which has a relationship with an Custom Object Demo__c. So, in Contact Page Layout, we can create a new Demo__c record by clicking the New button. I am ...
0
votes
0answers
18 views

Passing lookup field value to Standard controller

Am stuck and unable to understand how shall i pass the lookup field value to controller. I am using get set,but it dint show any variable value in logs for the lookupfield ? Am stuck and not sure what ...
2
votes
1answer
26 views

Compiled successfully, update not happenning

I have below batch class that is not doing DML update operation also no error in debug log. Can someone please help me here? Batch class: global class AckCallUpdatenew implements ...
6
votes
1answer
59 views

Best practices for custom controller actions

Many times I've came across the following issue: should I use one custom controller for all the actions for some sObject or some area, or maybe there should be separate controllers for editing, ...
7
votes
0answers
32 views

Static Inheritance and SUPER keyword

Question about how static member/method inheritance works in apex: For reference, this question is related, but doesn't address my question or take into account my findings: reference question I ...
0
votes
2answers
37 views

Too many DML rows: 10001 issue

I have a trigger that works perfectly in my sandbox. When I try to deploy, I get the following error message: receiving_Tests.receiving_Trigger_Tests(), Details: System.LimitException: Too many ...
0
votes
0answers
12 views

Sync Track trigger not working

This might be not directly a salesforce issue. I work in Veeva. There is sync tracking custom object in Veeva where records of User syncronization from Ipad is stored. I have to run a after insert ...
4
votes
1answer
672 views

Too many if statments?

So the Apex docs say you have to set the value of the master record if you want to retain the discarded account field values before the merge operation. Is there a better way to do validation for a ...
1
vote
1answer
11 views

Sync object not getting keyset

I have a custom object of Sync Tracking that allows to keep track for Users , when they are doing a sync from their ipad to salesforce. Now I need to write a trigger on that object, Sync Tracking ...
0
votes
1answer
11 views

Report Filter for CloseDate is from Past Month

I have following Formula on my Validation Rules, I want to find out which of my Existing Records comes under these validation rules, So, I am creating Report for it. I am unable to FILTER Following ...
1
vote
1answer
15 views

How to use ActionSupport, ActionREgion, ActionFunction all together

I have a requirement, where I have a dropdown fiter. On change of dropdown value, Pageblocktable will be updated. Dropdown field has no Button to excute the event, so it has to be ActionFunction. ...
0
votes
1answer
11 views

Redirecting to external site from the value from url field

I am fetching the value of wesite field from account i want to redirect to site when user clicks on the link. But am not redirected to the external url instead of that salesforce is appending its org ...
2
votes
1answer
50 views

Extension or Custom Controller?

I have a requirement, where I have to create a new custom VF page. Below image shown, is similar to my requirement. I want to build a page like below. When I will click New button, below page should ...
5
votes
1answer
66 views

Best way to query objects by pairs of values

I am wondering what would be the most efficient way to query some objects by the pairs of values, for example: public class pair{ integer x; boolean y; <constructor...> } ...
0
votes
1answer
9 views

Initial term of field expression must be a concrete SObject: LIST<Call2_vod__c>

I am getting subject error with below code. The line number is on update statement conditional if clause. But I can't get why I am getting such error? I have a trigger validation for those ...
-2
votes
2answers
29 views

Continue not working properly

I have below code where I do a check if a list value is contained in a set then jump to next iteration without executing the next statement that is update. Here I am using 'continue;' statement in ...
0
votes
0answers
13 views

VisualForce charting for percentage

I'm displaying a VF pie chart whose data is coming from an object. I need to display the percentage values along with the field's value. This percentage should display how much of the total area of ...
1
vote
1answer
8 views

Incompatible element type String for collection of SOBJECT:Call2_vod__c

I have the below code where the Set and list is of same type Call2_vod__c , a custom object in salesforce but still throws subject error in that line. Can some one help me here? Apex class: global ...
0
votes
0answers
11 views

Integrating Salesforce with Google Sheets

Is it possible to do integrate Salesforce with Google Sheets in a way which will allow me to create a new google sheet with my payload data which I will be sending from Salesforce ?
-1
votes
1answer
17 views

Need Help Debug this code

The problem is in the last For loop. Please nelp to debug. Thanks List<Business__c> businesses = new List<Business__c>(); Set<string> combineIds = new Set<string>(); ...
-1
votes
1answer
28 views

After delete trigger SOQL returns no rows

I need help I'm losing my mid. I have a working trigger and I'm writing a test class. My data is isolated ( no @seeAllData=true) I create a master and children objects in my set up. I insert the ...
3
votes
1answer
36 views

Why does this code throw an error when trying to create a Person account?

Code trigger CreatePerson on Contact (before insert) { RecordType personAccountRecordType = [SELECT Id FROM RecordType WHERE Name = 'Person Account' and SObjectType = 'Account']; ...
0
votes
1answer
23 views

What will updating a production server to Summer '14 do?

I'm trying to delete a trigger off production, but all my efforts to do so have been met with failure. My most recent attempt should work, but the IDE is first asking me to upgrade my version of the ...
1
vote
0answers
16 views

Is it possible to make this workflow happen with Triggers? [duplicate]

We're trying create a trigger that will fire when a new contact is added to SF (that contact is created via the Hubspot connector). Is the workflow below possible through triggers / Apex code? (I'm ...
-1
votes
0answers
5 views

How to create a MassEmail Button on Detail page Custom Object record?

I have two custom objects and I made a lookup relationship between them, Now my requirement is that I want to Create a Mass Email button on the Parent Object Detail record page. So, whenever I click ...
0
votes
0answers
14 views

Import Large CSV file using Batch Apex [duplicate]

I have a requirement to read a large csv file and insert into database. My code works fine for 3000 records but after that it gives me CPU time exception or Regex is too complicated. So, I thought to ...
0
votes
0answers
10 views

Autopopulate fields on custom object from opportunity

We have a custom object which has a field called Proposal_Number__c , which us also a custom field in opportunity. So when user enter values in Proposal# we want to auto populate other fields in ...
3
votes
2answers
28 views

How to create HttpRequest body as plain string from WSDL?

Is there an good way to (automatically) create proper request bodies from WSDL files just as a plain xml string? I need this for perfoming calls from APEX to different salesforce APIs, mostly for the ...
0
votes
1answer
19 views

Error in debug log though class compiled correctly

I have below batch class which compiles correctly but throws error runtime says expecting colon Error: FATAL_ERROR|System.QueryException: expecting a colon, found '(' ...
1
vote
1answer
15 views

selectlist inside apex:column errors out

I have a pageblock table with column as a selectlist, populated from controller. Here is the code: <apex:pageBlockTable value="{!records}" var="k" id="thePageBlockTable" ...
3
votes
0answers
32 views

Package test coverage way lower than actual

So pretty much what topic says. While trying to upload a package I get the following error: However, when I check test coverage anywhere else, it shows me 77%. Developer console: Setup --> ...
0
votes
2answers
25 views

Apex error Message doesn't appear on error condition

I have a save method like this, that will prompt on some error condition : public void Save() { lstAcct1.clear(); for(Integer j = 0;j<records.size();j++) { if ...
1
vote
0answers
15 views

data loader concatenate transform data from csv without changing csv

we have a scenario where we will be getting input data in csv files. we need to load these in custom objects in salesforce. we do not want to edit these csv files. there are scenarios where we need to ...
2
votes
0answers
13 views

How to access community logged in user in UrlRewriter

global class CommTestUrlRewriter implements Site.UrlRewriter { global PageReference mapRequestUrl(PageReference myFriendlyUrl) { // Always the guest user ...
3
votes
1answer
32 views

Delegated Authentication vs Service Provider (SP) Initiated Login

I'm reading about Salesforce SSO, I have some questions/clarification, I find the concept of Delegated Auth, SP Initiated Login to be same since salesforce calls the external IDP or external service ...
4
votes
2answers
49 views

Does one use savepoints in triggers?

It's not clear to me. Suppose I write an after update trigger on opportunity to update some related accounts and then contacts. Now I lets suppose that I had luck with the accounts but the second ...
0
votes
1answer
23 views

Rollup via Lookup Issue

I put together a trigger that will perform a rollup summary (SUM) on a record that is associated via lookup. The trigger works perfectly if I want to include all the lookup records in the calculation. ...
0
votes
1answer
29 views

Existing apex class is not calculating a roll-up field properly

I am trying to correct an issue with an apex class that I did not develop. I am hoping that someone can assist in finding the error. Essentially, the issue is with a field called ...
0
votes
0answers
20 views

Insert record from custom object

I am trying to insert a record on a child object (Idea_Comments__c) of the standard controller object (Idea_Lobby__c). After insertion, I would also like it forward to a VF page. So far, I have not ...
2
votes
1answer
36 views

checking FLS in triggers

I've seen loads of code examples of triggers and helper classes. They never check for object or field level permissions. I wonder if this was done for code clarity or is this something one does ...
2
votes
2answers
23 views

How can I get organization's namespace prefix or at least ALL namespace prefixes including org through any API

How can I get organization's namespace prefix through API? This solution doesn't match because it's not supposed that I know anything about org classes. I understand that I can query ApexClasses ...
1
vote
0answers
38 views

Scheduled apex to run only twice a day

I have the following Scheduled apex class. The aim is to run batch processes twice a day so i.e : Create case at 12pm, link the cases to accounts at 12:10pm then again at 12am and 12:10am. However, ...
0
votes
1answer
26 views

How to make static initialization considering user in runAs in Test class

public with sharing class Utils_SDF_Methodology { . . . public static final String BypassVar;//List of triggers that can be bypassed static{ System.Debug('## >>> ...
0
votes
1answer
16 views

Action support rerender not showing Outputpanel

Switching between Radio Option should show and hide Outputpanel. I got this working with following code: <apex:selectRadio id="benefitradioid" required="True" value="{!selectedTargetBenefit}" ...
0
votes
1answer
24 views

Date field on VF chart

I have created a combinational VF line chart. The values on the chart is plotted from a custom object "Profile__c" which has a lookup on Contact. I have created a select list on my page which is ...