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

learn more… | top users | synonyms

1
vote
1answer
8 views

Assign a case to a queue in Apex (Test class)

I'm sure this must be quite possible, and probably easy. I need to create a test method in which part of the scenario is that for when a Case is assigned to a Queue. I have successfully tested all my ...
0
votes
1answer
12 views

Redirecting a pageReference according to a picklist value

I created a class and include a webservice method that will generate the pdf and attach it to a record, but it's not working when I choose a specific value in the picklist in order to generate the ...
0
votes
4answers
18 views

How to render a panel with some Error message

I am new to Salesforce, so i'd be glad, if I could get some help. I am having a custom button, when I will click it, it'll check some condition, if it satisfied, then it will render a panel with an ...
2
votes
2answers
33 views

window.location not working

I am stuck in a situation, hope so I could get some help here. I'm having a condition where I want to redirect a page to one URL. It is related to service cloud console. In controller I defined a ...
0
votes
0answers
13 views

How can i invoke a child object trigger when a parent object trigger delete action invoked?

I have 3 objects like superParent Parent Child.. I am updating the count of Parent and Child object records on SuperParent in two different fields and it is working fine when i am doing manually. ...
0
votes
2answers
21 views

What does Developer Script Exception System.NullPointerException precisely mean?

Subject: Developer script exception from Relias Learning : CommentsOnClosure : CommentsOnClosure: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a ...
0
votes
0answers
20 views

Roll Up Summary fields on lookup relation ships

we have scenario where i am updating roll up summary fields values such as count and sum in account object. In one case i am deleting the parent object and the count of the parent object is getting ...
1
vote
2answers
53 views

How to display List<List<String>> in Visual force page?

In controler i will get the data as "List < List < String>>" , how can i display it on Visual force page? And that "List < List < String>>" is populated based on user input(Checkbox ...
0
votes
0answers
8 views

Updates comments to custom object with Approval process comments from ProcessInstance set of objects

I have a trigger that updates the approval comments from ProcessInstance / ProcessInstanceSteps to a Object Order_vod__c. Earlier I did this using Apex trigger and the code worked. Here is the code - ...
0
votes
1answer
13 views

Save file out of Salesforce to specific directory on pc

I have a client that needs to extract data on a button click and save a formatted file to a specific directory on the users pc. This is so a dos batch process can pick up the file and process it. Any ...
1
vote
1answer
23 views

Long running, but finite length Apex Callout generates timeout exception: Workarounds?

I am trying to work with a 3rd party service api . One of the methods they have brings in all records which takes a lot of time , about 9 mins ( i tried this using chrome app "Advanced Rest Client"). ...
2
votes
1answer
23 views

can't undelete record

I have tried to undelete a record, both in the Recycle Bin UI and via apex. The UI message is cryptic (4 potential explanations), but the apex debug gives me the following: DEBUG|Undelete failed. ...
2
votes
2answers
25 views

How to test for DML errors in 'before' triggers (i.e. use of addError)

here's a brief rundown of the trigger I'm trying to test: this trigger is trying to put a cap on records with a certain lead source. If someone selects this source and tries to save the record, it ...
0
votes
1answer
39 views

Updating a record without DML

I am writing an after update trigger on OpportunityLineItem that will update an opportunity based on values retrieved from it's respective line items. By sheer accident, I forgot to include the ...
-3
votes
1answer
37 views

Running an Apex batch

I created an apex batch, I configured it with the schedule jobs in order to run monthly, I want to test if it works or not. Have I write a Test class or execute it in anonymous and how is gonna be ...
-1
votes
0answers
16 views

Error in generating Apex class from Enterprise wsdl

I am trying to generate the apex class from wsdl file. While trying to create a class I am getting the following 2 error. "Error: enterpriseSoapSforceCom Error: Invalid type: ...
2
votes
2answers
65 views

Return list of records from Salesforce Object with JavaScript

How could I return a list of records using only javascript, with no apex: elements. My original approach was to use an apex:repeat like so: <apex:repeat value="{!attachments}" var="attach"> ...
-2
votes
1answer
53 views

0% code coverage - Any ideas? [on hold]

I need some help. This is my Apex class called - Deactivateusers Aim/Objective - To automatically De-activate users where the user hasnt logged in for the last 90days. Before I left my old job I ...
9
votes
1answer
56 views

Comparison fails when converting Opportunity from/to JSON

I am facing an issue when converting an Opportunity to and then from JSON. If I put that in a test, the assertion fails when comparing both Opportunities. Here is my code: Test case: static ...
2
votes
2answers
37 views

trigger to send email with pdf as attachment

I have a requirement where if I edit /insert a record, every time a pdf containg the field's value of that object will be generated and send as an attachment to the user. I wrote the below code. ...
1
vote
1answer
30 views

Convert a number to its expression in words (e.g. 55 -> fifty-five)

Is there a way to convert a number to a string (Apex code, formula field ..) For example: 5200 > cinq milles deux cents
1
vote
1answer
26 views

Show only 'today' and future dates in calendar picker. No dates in past

I am having a Date field myDatefield__c. I'm accessing it in VF page. So, is there any way, so that I can disable the old dates. For example: If I click on the date field, when calender pop up will ...
1
vote
1answer
26 views

Trying to change the profile of logged in user through apex

My requirement is when a user logged into customer portal using credentials-profile has to be changed when a action is called on button-click. At the time of login -profile is say 'abc'. I have called ...
3
votes
1answer
44 views

Populating Selected Records in Standard List Controllers

If you have a page using a standard list controller, like this: <apex:page standardController="Account" recordSetVar="Accounts"> You can create a custom button for account lists allowing the ...
3
votes
1answer
27 views

Salesforce inbound email to .msg attachment - Not opening in Outlook

An inbound email is converted to the outlook .msg file and stored as an attachment to a record using handler class. Everything works fine, except I get this error when I try to open the file with ...
5
votes
1answer
31 views

How to set a field value based on a long list of other fields

I'm looking for a best practice suggestion here as there are a couple of ways to solve this. Based on if any of about 40 fields have any value I want to run a specific approval step. So my first ...
2
votes
1answer
45 views

Salesforce Package Installation

Does anyone know any reason an error could occur if I do not download version 1.1 of a package before version 1.2. Some functionality don't work unless I install version 1.1 before 1.2. I cannot ...
2
votes
0answers
33 views

Error - System.CalloutException: Received fatal alert: bad_record_mac

An existing integration from Salesforce to Oracle stopped working this morning. When I send an http request from Salesforce to an Oracle webservice, I get a message "System.CalloutException: Received ...
5
votes
3answers
348 views

How do I get the length of a string field?

For a string field, is there a way to get the defined length of the field? For example say I allow a maximum of 10 chars, can I get that in apex? I am not asking how to get the length of a string ...
0
votes
0answers
16 views

Como comparo y tomo solo un registro si tengo “N” registros iguales [on hold]

Amigos tengo el diguiente problema: solo debo marcar un registro de los "pendientes", lo que el código hace en estos momentos es que toma el código de una cartola y busca las coincidencias en todos ...
2
votes
2answers
24 views

update the account field based on opportunity in salesforce

My request is to update the account field based on opportunity both has same fields name i.e segment1 which is multi select pick list values an account has multiple opp right. when i update the opp1 ...
1
vote
0answers
18 views

Show The first field value based on 2nd field value dynamically?

I have create a page which has picklist based on that picklist i have to show the rows and in that rows i have toshow 1st row value based on 2nd valu means level low days high ...
1
vote
2answers
24 views

How to do GROUP BY

Hi i have written this query but it will give earror(Field must be grouped or aggregated:) [SELECT Profile__c,name,count(NumberofLogin__c),Startdate__c,EndDate__c FROM User__c where GROUP BY ...
0
votes
2answers
22 views

Overriding detail page on clicking save button

I have multiple VF pages apex/vf_table1, apex/vf_table2 and "apex/vf_table3" in iframes in a single VF page "apex/vf_table". All uses the same save button. How can I override the save method of the ...
-3
votes
0answers
27 views

Can anybody write a test class for the below code. [on hold]

I am trying from last few days to write test class for the below written trigger where the trigger is assigning Operation (custom object) record an owner depending on previous 2 owners of same service ...
-1
votes
0answers
16 views

How to develop a Html5 game using salesforce [on hold]

Hi I just want to know whether there is any chance of creating a Html5 game which run on cloud using salesforce with the help of canvas and javascript.
2
votes
1answer
41 views

problem w/ 15 char ID's and case-insensitive sorting

So here's the deal. I have a somewhat complex formula field that returns a Campaign ID. Then I have a SOQL query in apex that needs to ORDER BY this field. The problem is that ORDER BY is case ...
0
votes
0answers
16 views

Apex REST for Approval Process from Spring'14 doesn't work for me

When I try the new Apex Rest functions of Approval Process from Spring'14 (Ver.30), I got following errors. 'Get a List of All Approval Processes' does work and 'Submit a Record for Approval' also ...
5
votes
3answers
95 views

Dynamic Apex Question

I am trying to extend a apex metadata coding example for retrieving the record types for all objects in my org. I know this is basic but I am working my way through coding examples for my 501 ...
0
votes
1answer
31 views

uncheck checkbox for remaining record in same object if one record checkbox is checked

I am using before update trigger I want to uncheck checkbox for remaining record in same object if one record checkbox is checked. trigger trigger_ManagePrimaryMember on Team_Members__c (before ...
0
votes
1answer
35 views

How to Override Edit button for Custom Visualforce page based on RecordID

I have Order form,where there are 3 types of Orders(OrderScan,OrderFill,OrderGet) for each of these i have created Visualforce Page for new Orders(By Overriding New button).Based on these Record types ...
0
votes
0answers
16 views

Send message to Azure Queue using REST webservice

I have azure webservice URL and there secret key for access authentication to a Azure Queue. I gone through post1 and post2, but here i didn't found anything about how to consume Azure service bus ...
3
votes
1answer
25 views

How to get namespace of all packages installed in a salesforce organization?

I want to fetch the namespace prefix of all packages installed in a salesforce organization.How can I do that?
0
votes
0answers
21 views

How To Upload Any attachment on custom object [on hold]

i want to store any document file when new record create on custom object through visualforce page Example Name : Sonu Uplod (Button) : Any document Upload save
0
votes
1answer
23 views

ListException: List index out of bounds: 0 for Custom Employee User account

When i create new User Account and login with that credentials, it gives me this problem if admin doesnt have set thier values yet !!!** AllotmentList = [select id, Days_Remaining__c from ...
1
vote
0answers
16 views

System.ListException: List index out of bounds: 0 error for Custom Employee Profile User [duplicate]

I HAVE ALSO TRIED "isEmpty()" When i create new User Account and login with that credentials, it gives me this problem if admin doesnt have set thier values yet !!! AllotmentList = [select id, ...
1
vote
1answer
46 views

Tool tips in visualforce chart

I have a VF where I am plotting percentages in bar graphs, but in the tooltip, I want to show the revenue associated with the record. Please note that percentage and revenue are in the same wrapper ...
3
votes
2answers
26 views

OOTB Multiple contacts feature in Visualforce

Is it possible to access the new OOTB multiple contacts on tasks feature?
3
votes
0answers
47 views

Implementing Trigger Framework(KevinOHaras)

I've been researching some best practices, and trigger frameworks and I found Kevin O'Haras TriggerHandler Framework. Now I don't fully understand it, I don't understand how to reference the Trigger ...
1
vote
1answer
36 views

Accessing child records in visualforce

I have an object Feedback_Comment__c which lookups to Feedback__c. How can I access "Feedback_Comment__c" fields in a datatable column? I could pull all Feedback__c fields like this... ...