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

learn more… | top users | synonyms (1)

0
votes
2answers
14 views

Alternative to write SOQL out of FOR in Batch Apex

I have following trigger executing after record is inserted and calls a batch to process records. In this batch I have few IF conditions to update records. Due to business scenario I have to write ...
0
votes
1answer
9 views

Apex dataloader login error

I am trying to login Apex Dataloder, but it's throwing error like this: Failed to send request to https://cs24.salesforce.com/services/Soap/u/23.0/00D19000000ECyF Actually I am using the sandbox ...
1
vote
2answers
20 views

Need to cover code coverage

Hi Below are my class and testclass. please check and help me out. class: public class IntegrationExecution{ public Boolean IsOrgName {set; get;} public IntegrationExecution(String ...
-2
votes
0answers
13 views

<select > tag values pass in URL as parameter [on hold]

How can pass tag values in URL's parameter. So that i can change this value via URL. This is pick list values pictures. Following picture is showing ID and value.
3
votes
2answers
38 views

UserInsertUpdate: System.LimitException: Too many future calls: 51

I have a trigger on User that after it's inserted or updated, I want a contact for that user to be created. For example, if a new user Fred is created, I also want a contact created with Fred's ...
4
votes
1answer
57 views

Using advanced IF in Formula field

I am trying to get the percentage of process completion, I have some checkboxes that I want to check each one if checked or not, for every checked box I will increase some value then get the ...
1
vote
0answers
12 views

How to test an input file?

I have this controller i want to test: public class SubirCV { public ContentVersion contentToUpload {get;set;} public Id memberId{get; set;} public Blob fileContent {get;set;} public ...
2
votes
1answer
28 views

<apex:selectlist> value don't pass to controller

I'm trying to do a simple selectList, and pass the value to controller when I click a button. Sounds simple (and it is), but I can't get this to work and I dont now why. VF Page <td> ...
1
vote
1answer
36 views

Test class coverage for apex class

I am trying to write a Test class for one of my class, however the coverage is not even changing a bit. Please help Class- public with sharing class accountTriggerHelperClass { public static List ...
1
vote
2answers
17 views

Changing Person Account RecordType to Business Account RecordType

I am investigating possibilities for changing the RecordType of an Account from Person to Business Account. The reasoning for this is that I have a third party system which syncs Accounts with ...
1
vote
1answer
15 views

PDF Editor For Visualforce Page [duplicate]

I want to create an PDF Editor. Following is my requirement 1- Create a visual force page which can edit PDF lets call it is as an PDFEditor. 2- I am having another VF page called ContractPage which ...
0
votes
2answers
26 views

1 to 1 look up for a field on the same object

I am trying to do a 1-1 look up relationship of the same object. This is the situation: I have a look up in my account called partner (Partner__c) and it is a look up to the same object (account). ...
0
votes
1answer
18 views

Help with trigger on lead

I want to write a trigger on lead. when new record come it match email id with old record. if email match it update the old record otherwise insert a new lead. please help me... i am new in ...
2
votes
1answer
15 views

Why Trigger.newMap in before Update event?

I am new to salesforce and apex and when reading about triggers, I found this confusing. Could somebody clarify on this please? From salesforce documentation: newMap-->A map of IDs to the new ...
2
votes
0answers
17 views

Double tab bar in salesforce

How do i solve this problem. I had used isdtp=vw,,isdtp=mn,isdtp=lt but these parameter changing new org to old org. This problem comes when i create a web tab.
1
vote
1answer
20 views

How to hide or remove default home tab in salesforce?

I want to Hide or remove default home tab in my sandbox org. if it is not possible then can i make my VF page as Default landing home page. How can i do?
0
votes
2answers
18 views

Delete a record and insert it again - Apex Controller

I have a situation, where in a record if Name__c field is updated, delete the record, and insert a new one with Status__c = In Progress. Also when inserting the new record, all the values of the other ...
0
votes
2answers
14 views

Solved! Update children record using Javascript in button

I am trying to update a field in children records(Purchase_Order_Details__c) with Javascript in a button from the parent level(Purchase_Order__c). My problem is that I need to sum 10 to the field ...
1
vote
1answer
16 views

Any single method available to escape unicode, single and double quotes

Is there any method similar to "escapeSql" that is available on SalesForce platform. This would be a great feature and will be very useful method for companies whose data is global where Names might ...
0
votes
0answers
13 views

Getting desired XML Structure using Apex Webservice

I have a inbound webservice written in Apex. When I am generating the WSDL file and validating the Request XML format I see a flat XML structure. This is not what am expecting. I would like to have ...
0
votes
1answer
33 views

Webservice test class [on hold]

I need some help writing a test class for the following. Any help/suggestions would be greatly appreciated. Thanks global class Oppty_SearchResponse{ webservice Boolean isSuccess {set;get;} ...
1
vote
1answer
16 views

Casting 0.00 decimal fields to null check in APEX

I'm working on standard page and what is the best way to cast any 0.00 to null check? I have a situation where I want to check to see if the decimal value is 0.00 but is that consider to be a best ...
0
votes
1answer
27 views

LIST: I'm adding duplicate values to it instead of two records with the same info

So, I'm having trouble inserting a List, since it gives me the " Before Insert or Upsert list must not have two identically equal elements". EDIT: SOLVED: removed code as it's 'live' code, but the ...
2
votes
1answer
33 views

Dynamically create html table rows based on List of records

I need to pass a list of records into the email body in apex code. I am looking for the code sample or an Idea to start doing this. so far i am doing this. Java script button on detail page. onclick ...
1
vote
2answers
23 views

Create new record if Nested Query result is null?

I have a class in which I'm building a List for an object and am utilizing a nested query. My trigger/class works perfectly when there is a record within that nested query. Everything breaks down when ...
0
votes
1answer
20 views

visualforce page with parameters in Unit Test

I cannot understand whats going wrong in this unit test. Last assert is failing: array is out of bonds. Thats a fragment from test class: static testMethod void testRemoveContact() { ...
1
vote
1answer
21 views

Unable to output value of a map

Declaring a map with list as value and getting the output for value as: "common.apex.runtime.impl.ScalarList@7861" Page: <apex:page controller="abc123ex"> <apex:outputPanel ...
1
vote
0answers
14 views

Is there an option to prevent an Opportunity update on OpportunityLineItem update?

I have triggers on both, Opportunity and OpportunityLineItem (OLI). On a specific update to an Opportunity, there's a big process started at the end of which I need to update all OLIs related to the ...
0
votes
2answers
24 views

Custom Object Field Tracking

We are trying to track the duration (time spent in days/hours) in each Status change (Custom Field) on the Opportunities Object. Right now we have enabled field history on this custom field (picklist) ...
-1
votes
1answer
23 views

id value of incorrect type [on hold]

Coud you please suggest appropriate solution to the following error. Error: Apex trigger PreventTaskOwnerChangeTrigger caused an unexpected exception, contact your administrator: ...
0
votes
0answers
13 views

Multi part form posting from Apex to AWS S3 with blob file and post parameters in the same request

This is a continuation of How to upload an image to AWS S3 using Apex? The sample HTML HTTP post form, given by Amazon, works like a breeze. Converting this HTML to Visualforce is a piece of cake, ...
0
votes
1answer
25 views

How to write trigger to automatically update custom email field on my acustom account wheen email id of related contact is changed [on hold]

I have written a custom account tab which fetches the data from standard account tab and i have also added custom email field to it. Below is the page which show a detail of account which is clicked ...
0
votes
1answer
18 views

Given a Master-detail relationship use apex loop through child records?

If i have a master-detail relationship with a "Classroom" and a "Student" Object. Say the master object is a classroom and the child objects are students. How do i aggregate a list of the student's ...
1
vote
1answer
29 views

Test method refuses to execute parts of trigger

I have this beforeUpdate trigger on Lead, which is calls a static method to populate 3 different fields based on data passed to a Picklist field. Field definitions: Campus__c: Picklist ...
0
votes
0answers
16 views

Cross site scripting issue with “ApexPages.currentPage().getParameters().get('Id');”

I got Cross site scripting error from 'Security scan report' for following method in Apex code: String myId = ApexPages.currentPage().getParameters().get('Id'); I tried to find another solution for ...
0
votes
0answers
8 views

Getting message: Expression of type Schema.DescribeFieldResult has no member named on describing picklist value

There are two picklist values on a custom object. I was trying to describe a picklist value using below code. For one field describe result is showing values but for other field of the same object in ...
-1
votes
1answer
11 views

How to use D3.js file in VF Page [on hold]

HI could anyone please say how to use d3.js step by step procedure with small example from the scrtch like loading the script in static resuorces will be so thank full to you in Advance
2
votes
1answer
29 views

How to handle exception in Lightning Components

I am new to Salesforce Lightning Components. I have an Apex class that returns map of task's owner name as key and list of task as value and it is called from controller of some lightning ...
0
votes
1answer
16 views

Split method truncating result and appending '…' in the end

String s = 'a b c d e f g h i j k l m'; System.debug(s.split('')); above code returns (, a, , b, , c, , d, , e, ...) am I missing something? Please help
0
votes
1answer
25 views

I am getting this error. what does it mean and how can i solve this?

I am trying to update account's Broker_User__c field with userid after inserting user.when performing accounts object DML operation this error comes. System.DmlException: Update failed. First ...
1
vote
1answer
9 views

Creating an OrderItem from a QuoteLineItem

I'm trying to write a trigger that - when a Contract is activated it's accepted quote is converted into an order, under which the QuoteLineItems are now "copied" into OrderItems (order products to the ...
1
vote
1answer
18 views

Update unit price in a Custom Object Inventory__c from Pricebookentry unit price

Code public void updateprice() { List<Inventory__c> obj=[select Id, name,Product_Code__c,Remaining_Balance__c,unit_price__C from Inventory__c limit:10 ]; for(Inventory__c i: obj) ...
0
votes
0answers
17 views

Decimals pretending to be Integers when used in Maps

I came across some very strange behaviour when working with a Map with Decimal keys today. It seems like the Decimal type can't handle Integer assignments properly, but allows them nonetheless. I've ...
0
votes
1answer
23 views

Controller hardcoded login

I'm trying to setup an anonymous account for users to post with. try{ system.debug('-------forum_ctl ' + UserInfo.getName()); pageReference pr = Site.login('anonymous@example.com', ...
1
vote
0answers
13 views

How to query on data categories in salesforce?

(SELECT Id, ParentId, DataCategoryGroupName, DataCategoryName FROM Info_Hub__DataCategorySelection). In this i did not find complete list of data categories. I want to list up all data categories ...
0
votes
2answers
26 views

how to pass the value of output field to another page in salesforce apex

I have a output field like <apex:outputField value="{!objAccount.AccountNumber} "/> and i want the value of this field(whisch is 1234Ex) to be passed to another page so that i can use it ...
1
vote
1answer
13 views

Adding Apex pages to lead layout page

I'm trying to add a Google Map to my lead page layout. I've made the page in Apex, how do I insert into my lead page layout? Alongside my custom fields, etc? Thanks!
1
vote
1answer
27 views

Test class for http callouts

I need to cover my class code. I have http callouts in it. Any lead how to do that? I've searched in the internet and found that httpcalloutmock help to test the http's request. Any example please?! ...
0
votes
1answer
25 views

System.EmailException: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id : using Event in WhatID of singlemailmessage method of salesforce

I am trying to send email to Contact through Apex class with SingleEmailMessage for Event assigned/updated for him, so used: SetWhatID = Event.id; It is failing to send email with below exception: ...
1
vote
1answer
17 views

Finding the current RecordType name selected by user

Updated code to give you more context of what I'm doing. trigger vendorTrigger on vendor__c (after insert, after update) { vendorController vencont = new vendorController(); ...