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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Salesforce Remoting Multiple File Upload

I am creating a module where you can upload multiple files to salesforce using remoting. I used the same approach as described here in this post ...
0
votes
0answers
10 views

How to use checkbox in dependent picklist in visualforce page?

I am having pick list field having all existing objects, if i select any object i need to display the particular selected object fileds in the below section with checkbox before the field label as ...
1
vote
1answer
19 views

hmacSHA1 Encryption Question

Does anyone know whether the crypto.generateMAC function generates a hmacSHA1 encrypted in binary or hexidecimal?
1
vote
0answers
26 views

Apex unit tests taking very long time to execute inside Salesforce

I've written several simple Apex unit tests and I'm trying to run them through Salesforce, so: Setup > Develop > Apex Test Execution > Select Test... > Run The tests are passing, the ...
-1
votes
0answers
41 views

I'm only getting 24% coverage, any ideas on how to increase my coverage? Thanks!

@isTest private class TestOliWizard { static Opportunity opp; static PriceBook2 p; static Product2 pb; static testMethod void testWizardWithPriceBook() { setupData(); opp.Pricebook2Id = [Select ...
-1
votes
0answers
34 views

how to put filter on recordType values

We need two separate tabs based on the same standard object. As salesforce doesn't support my requirement using standard configuarion, have created simple VF page and defined a tab. But as both the ...
-1
votes
0answers
19 views

Trigger Calling a Batch Class to Perform Mutiple Object Updates [on hold]

I am looking for a way where we can implement the trigger calling batch class which then update multiple object field values. here we will be passing the parameters like api object names and field ...
2
votes
3answers
25 views

How can i apply css style for pageBlock title? can i use image as pageblock title?

I want to apply some styles to PageBlock title like changing font color, style and background color. and Can I assign image or logo as pageblock title.. Give me some working example. this is my code: ...
1
vote
1answer
13 views

want to auto click the link when a field update happens picklist value is “sent customer”

want to auto click the link when a field update happens picklist value is "sent to customer". I have a link from website that when i click on link it will change status on website. what i want is ...
0
votes
0answers
9 views

How to define id:String in sforce.console.openPrimaryTab instead of null in salesforce?

I want to define ID in openPrimaryTab(), so that I can ID corresponds to an existing primary tab, the existing tab will redirected to the given URL because the Salesforce console prevents duplicate ...
2
votes
1answer
15 views

Web-to-lead Page is Not Accepting Chinese Characters and Not Creating Leads

The web-to-lead form is not creating any leads if we submit Chinese characters in the form fields. Can someone let me know how to submit Chinese language in a web-to-lead form?
2
votes
2answers
27 views

SaveResult Get Failed records on Insert

I would like to insert list of records, catch various exceptions, and if the exception is something I can't handle send the offending objects for manual processing. I can write most of what I need, ...
3
votes
1answer
18 views

Encoding used when sending emails through singleemail method

When sending out a single email salesforce encodes the HTML body As per doc : ...
1
vote
1answer
31 views

unexpeced token: ( with dynamic SOQL

The following gives an error on runtime: String queryString = 'select name,street_address__c from warehouse__c where' + 'DISTANCE(location__c,GEOLOCATION('+ lat + ',' + lon+ ' ),\'mi\') ...
2
votes
3answers
39 views

Apex:CommandButton sending data to controller

I'm trying to create a visual force page with a table and a "request" button that will take the selected row and append it as a task. Here's a photo of the table: When a user hits request, I want ...
1
vote
1answer
12 views

hide/show depends on the picklist selection

I'm working on a page where I have a pick-list and based on the selection the user should be allowed to enter depends on the pick-list so for an example: Picklist ==> Miles, Days if the user select ...
2
votes
2answers
41 views

UNABLE_TO_LOCK_ROW error in parallel apex tests

i get an UNABLE_TO_LOCK_ROW error when running my tests in parallel. The error occurs when creating a pricebookentry for the standard pricebook. As far as i know Salesforce locks also the parent ...
-1
votes
1answer
37 views

A Trigger to update the values of field“ number of leads ” when Lead is created [on hold]

I want to update the values of field" number of leads " when Lead is created I need to write a trigger on lead object to update the value. could you help me , because I'm a beginner with apex and ...
1
vote
0answers
24 views

Best practice to make SOAP call to long running external web service

It is a good practice I make a SOAP call to an external service salesforce using a custom button (js)? Many customers need to send sales order to ERP, in a standard page insert a custom button (js) ...
-1
votes
1answer
31 views

DateTime format is out of format

i have a field of DateTime data type in an object. I have called it in a VF page. In VF page Standard stylesheets is set to FALSE. Still i'm getting a standard date/time format when i put the mouse ...
-1
votes
0answers
8 views

Social login activation on Communities Salesforce

I have implemented login to Salesforce using LinkedIn which works fine when I login from My domain login page. However, I am not able to save this option on Communities login and registration page. ...
0
votes
1answer
24 views

Redirect to edit page and then to detail page from apex [duplicate]

I am trying to deep clone the objects. I got the code for deep cloning from a blog http://christopheralunlewis.blogspot.com/2012/04/clone-plus-clone-salesforce-objects.html which is working perfectly ...
1
vote
2answers
17 views

Type is not visible with Visualforce Component and Apex controler

To test Salesforce function, I develop a Visualforce page which use a Visualforce component. In the Visualforce page, I call the Visualforce component and in the Visualforce component, I have an ...
-1
votes
0answers
16 views

How to save bookmarks using Apex

I am trying to save Bookmarks in my salesforce App. I want to save a Bookmark name and Bookmark URL to Bookmark Object. How to save a new bookmark using apex code. what are that Bookmark object ...
5
votes
1answer
30 views

How do governing limits work with @testSetup from Spring 15' release

The new @testSetup method is covered pretty well by Jesse Altman in his: New Spring ’15 Feature: @testSetup article but as mentioned in the comments, there is a question about how this new feature ...
3
votes
1answer
57 views

LetterHead in Apex

Is it possible to access LetterHead in apex.I need to put the letter head in sethtmlbody method.How to access LetterHead. UPDATED Here the bt.value is displaying blank when contact is receiving an ...
0
votes
1answer
10 views

PDF send as email attachment not opening

We have 2vf pages (1page per quote creation and 2nd page to generate PDF but both pages using same custom controller.On click of button I'm sending email with generated PDF but in mail its not opening ...
4
votes
2answers
53 views

Why does Database.query perform so bad as opposed to [… my_soql_here …]?

I looked at this, but clearly there appears to be a big difference between the two. Can someone please explain the behavior and/or suggest a workaround? I already posted this comment in this ...
2
votes
1answer
20 views

Can anyone explain this 'variable does not exist error'?

I have a test class which calls a method from a helper class : @isTest private class OpportunityCheckTest { private CheckTestHelper helper = new CheckTestHelper(); @isTest static void ...
0
votes
2answers
45 views

I get System.LimitException: Too many query rows: 50001 when querying via a static method in a different class but not if querying from the same class

I understand this exception. But what I don't understand is this: THIS APPROACH WORKS: public List<String> optionType { get { if (optionType == null) { ...
1
vote
2answers
18 views

Is there a way I can record when the last time a piece of code was run?

I have written a Page and Controller which update a field in all Person Accounts in my org using a batch process. This is only meant to be done once a year. Is there a way I can record the last time ...
1
vote
2answers
22 views

Visualforce page reloads itself after actionFunction call

I would like to use the component apex:actionFunction to set a variable from a custom controller but after the call, the Visualforce page reloads itself. :/ I use return false; on the outputLink ...
1
vote
2answers
24 views

Error on selecting value from dynamic picklist

I am getting error while selecting value from a dynamic picklist. The picklist values are generated on form load by selecting the distinct values for a field in an object. Class public ...
-1
votes
1answer
29 views

Type cannot be constructed error in trigger to covert leads into contacts, accounts and opportunity

Error: Error: Compile Error: Type cannot be constructed: Object at line 27 column 22 Code: trigger LeadConvert on Lead (after update) { // no bulk processing; will only run from the UI ...
1
vote
1answer
19 views

Check formula fields in apex

I know we can use describe calls to identify if a field is a custom field or not. Similarly, is there any way we can check if a particular field is a formula field in apex? As per my knowledge and ...
2
votes
1answer
44 views

Problem with trigger when Inserting new records on custom object

I am trying to insert new records into a custom object (production) via apex data loader. When I do so I get an error like ​ ReservationTrigger: execution of AfterInsert caused by: ...
-1
votes
3answers
36 views

Truncate string to n characters without loosing word

I am having a field called Description, which may contain a string which will be greater then n characters. I want to display this description on a VisualForce page. I want to truncate this ...
6
votes
2answers
384 views

What is it called when you initialize things with =>

I was looking for a way to do one-line variable creation and found this: Initialize Map<String, Integer> private Map<String, Integer> myMap = new Map<String, Integer>{'a' => 1, ...
1
vote
0answers
9 views

Custom Clone button with ability to validate picklist values for Record Types

We have a custom controller for a custom clone button that also checks whether the picklist values are active on a parent record when a Case is being cloned. If any of the picklist values on the ...
1
vote
2answers
15 views

First Activity Date

I have created a new field First_Activity_Call_Duration__c in the object Opportunity. It is supposed to hold a value from the first related task that was created against the Opportunity. Next, I ...
0
votes
1answer
10 views

updating parent object after record approval

I'm trying to update parent record when current record is 'finally approved'. I've master-detail relationship between parent child was trying to achieve this in following ways : 1) Firing Cross ...
0
votes
0answers
19 views

need help to remove slice out functionality from apex:chart

sfdc folks ...i need to remove slice out functionality from apex:chart from my vf page... here is vf page :: > <apex:chart height="130" width="230" data="{!PieData}" animate="false" > ...
5
votes
2answers
386 views

How to prevent users from viewing apex code?

There are many apex classes and triggers in my production org. Despite 'System Administrator' being the only enabled profile, (in Develop>>Apex Classes>>"Class Name">>Security) users can still view ...
0
votes
1answer
14 views

Mass transfer approval process

In our case, usually the users request us the approvals pending of a particular user. We go to Setup -> Administration Setup -> Data Management -> Mass Transfer Approval Processes and we manage ...
0
votes
1answer
26 views

Apex Data Loader problem

I am trying to insert data into a custom object. My MD field with Contacts is Email__c. I want to use the email to identify the contact as is the unique identifier for my custom object. ( like when ...
0
votes
1answer
9 views

ApexPage.Action passed to VF component as component stays null and cannot be invoked

I have a custom VF component that gets passed in an ApexPages.Action (=passedInAction()) that needs to be invoked when the user performs some changes inside the component (=doInvokeAction() method). ...
0
votes
2answers
44 views

Rerender output panel when action method using pageReference

Can anyone tell me how to rerender a particular pageblock when the action method using pageReference? My use case is I want to rerender a particular block when I click the command button ...
0
votes
0answers
15 views

LoadState() Method.

I have a question in regards to a LoadState() method I found. I have been trying to find some information after seeing this method on an Apex @future(Callout=true)class. I know this method exist in ...
0
votes
0answers
24 views

Salesforce package.xml

I am creating a XML file. How can we add related lists, tabs, sub-tabs in a XML file? Can anyone give me an idea?
-3
votes
1answer
22 views

What is the use of gethost() method in apex

Can anyone tell me what is the use of gethost() method in apex .And why we use it.