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

learn more… | top users | synonyms

1
vote
2answers
21 views

How do you capture an e-signature and attach it to a record in the Salesforce1 app?

I created a custom button on a custom object that launches a Visualforce page to capture the signature of a user. The Visualforce page has two buttons: Capture Signature and Exit. Upon clicking ...
2
votes
1answer
31 views

Reading Long Text Area field with line breaks

I have long text area field, which has data on each line. I am populating a line then hitting "Enter" and then populating the next line and hitting "enter" again and so on. When reading this field ...
3
votes
2answers
26 views

Odd behavior with Custom Setting getInstance() Method

In an Org I'm working with we have a Custom Setting that holds a number of Zip Codes. The zip codes are populated in the Name field of the Custom Setting, with no other fields. We use the Lead ...
2
votes
0answers
6 views

Creating KnowledgeArticleViewStat Test data for Apex Testing

Is there anyway to create KnowledgeArticleViewStat test data for particular article types to use for Apex testing? I know that publishing an article requires the KbManagement.PublishingService class, ...
1
vote
1answer
24 views

Unknown Property error for two variables - one prevents VF page from saving, other throws runtime error

I have two variables that are causing problems: “students” and “stuinclass”. Previously these variables were incrementing the number of classes (in a school, not Apex classes) contributing to a ...
2
votes
1answer
16 views

Connecting to SalesForce from Web App

I was wondering if it is possible to connect to SalesForce from my web application in order to update a user's information. Let's say my customer has a user with a SalesForce ID of 123, and I have ...
3
votes
1answer
20 views

Community user can not return document

I am creating my own profile page (branding/security reasons) and I ran into an issue where the user is not able to change their profile image. public Document document { get { if ...
0
votes
0answers
10 views

Salesforce.com integration with Oracle-EBS [on hold]

I am newbie to the oracle products. Could you please help me how to integrate SFDC with Oracle EBS.Any information on this would be really helpful. Thanks, VenkatSforce
4
votes
3answers
225 views

Making regex case-insensitive

I have created some lines of code for an email handler that will scrape my emails for a particular string (STA0123). Code: // Find STA No. (in email body) Opportunity Opp = [SELECT id, STA_No__c ...
0
votes
1answer
29 views

Deployment error while deploying

Apex class: public void post(){ HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); req.setMethod('POST' ); ...
1
vote
2answers
62 views

Error in VisualForce Page as :List index out of bounds: 0

Can any one help me out with this Error ??Any help is much appreciated Error in VisualForce Page as :List index out of bounds: 0 Here is my VF Page and the Class. Visual Force Page : ...
1
vote
1answer
25 views

How to get Timezone from the Lead Address field?

How to get timezone abbreviated key from lead address fields using apex?
1
vote
1answer
34 views

Apex Deployment Issue from third party app

When I try to deploy a simple apex trigger and test class, I can't seem to pass due to third party app called accounting books. I tried to pass these trigger and test class from other Salesforce ...
1
vote
1answer
23 views

How does the batch execution fetch records to do any operations

Okay, I have huge set of records in a Custom object and i'm fetching these to do some kind of DML operations. During this batch process, how exactly does the records are fetched as in what order and ...
1
vote
1answer
35 views

Validation for inputFields inside Pageblock table is not working

I am trying to do a simple validation, if qty received ENTERED is different than qty ordered, a JQuery dialog box should open. For some reason this validation is working only for the first ...
1
vote
1answer
36 views

I wanted to make a page which is readonly but when clicked on edit the user should be able to edit it

I have basic user details page, that I display to user when they login. Now once they click on edit they should be able to edit their information on the same page. I am doing this for the first time ...
-3
votes
1answer
41 views

Best Practices to call on-premise webservice from Salesforce

what is best way to call the on-premise ws from salesforce. How can we make the connection and do the handshaking ? Regards. Ankit
5
votes
1answer
40 views

JavaScript Remoting and optimal Angular.js architecture

Background I am starting to build more and more apps with angular, inside of a Visualforce container. Since many of the database services rely on some apex logic, the services layer uses JavaScript ...
2
votes
1answer
59 views

Tabular report data via analytics API

I was wondering if I could run my tabular report via API and create a csv file by traversing the result. I had a look at the examples and wrote a piece of code but.... Unfortunately I have no idea how ...
0
votes
0answers
18 views

How best to implement a rolling Archive that runs without User Intervention

In this case I have a custom object that grows by up to 7,000 records a week(but the same issue could apply to any standard object). I want to have a rolling archive that archives off records that ...
6
votes
2answers
81 views

Apex Returns Different Result From Developer Console

I have a custom profile called MyCustomProfile. When I want to get profiles in my Apex class I don't get System Administrator. But in Developer Console, with same code, I can get both of them. ...
1
vote
0answers
19 views

Posting multiple files from Apex code to an external service

The question on how to post binary data to an external service from Apex has been answered on SFSE already, and I'm aware of that. However, what I'm trying to do, is to optimize a process by posting ...
2
votes
3answers
44 views

MS-SQL Integration with Salesforce [on hold]

What is the best way to implement a Batch process between MS-SQL and Salesforce? How to get the data from MS-SQL to Salesforce using any tool or webservice? Are there any materials to learn about ...
3
votes
1answer
80 views

HTTP Callout Error

I have the below code trying to make a HTTP callout from a APEX class. The response I get back is System.HttpResponse[Status=Moved Temporarily, StatusCode=302] However if I use the same URL to make ...
2
votes
1answer
50 views

How to Assign TEXT to DATE field

I need to display "Not Available" on a date field. Actual_Delivery_Date__c and calculated_actual_delivery_date__c are date fields. So the following code works fine ...
2
votes
1answer
35 views

Setting a dynamic pdf filename to my visualforce page

I would like to set a dynamic pdf filename to my visualforce page Thé code is below, however this code still generated pdf with visualforce page generic name? (This code is Just to test to set a ...
1
vote
2answers
50 views

How to get correct week number in Apex

I am struggling to get the correct week in year for any given date. Datetime dt = Datetime.newInstanceGmt(2014, 1, 5).addHours(12); Integer week = Integer.valueOf(dt.formatGmt('w')); ...
3
votes
1answer
39 views

ActionPoller and pageMessages rerender issue

I have a pretty batch that is trigger from a VF page. Then I check the batch status using an ActionPoller until it is completed and finally I rerender the batch results. Everything is working fine ...
2
votes
1answer
94 views

Why record is removed on exception thrown

I'm inserting and updating a new record before throw an exception like this: Operation__c o = new Operation__c(ok__c = false,Step__c = 'test1'); insert o; system.debug(o); //this shows the Id try{ ...
2
votes
0answers
36 views

Cloud Scheduler (Meeting Request)

Can we pre populate To field in Meeting Request.How to achieve this. or Is there a way create a meeting request through apex/vf page Note: This is the Pop-Up which comes when we click on New ...
2
votes
1answer
41 views

Help with Trigger logic

I am in the process of writing a trigger to create a child record when a parent record is created. I have it mostly working but need some help. Below is my code: trigger AutoCreateCommission on ...
1
vote
1answer
24 views

Controller to place opportunity products related list on case page layout

I am trying to create a controller to view opportunity line items on a case that is related to an opportunity. I am not a developer, and copying and pasting code. I am currently receiving an error: ...
8
votes
1answer
103 views

Is this a Salesforce bug? If so, how do I report it?

Running this code snippet Anonymously produces the following error: "System.NullPointerException: Attempt to de-reference a null object" Map<SObjectType,List<Id>> myMap = new ...
1
vote
3answers
58 views

How to get custom tab visibility in controller based on user profile?

I have a custom tab name 'Payments' and i need to provide a short cut access link to this tab from other pages. I know how to control the visibility based on object level settings, However, in this ...
1
vote
3answers
82 views

Trigger to Auto Delete Records

We use MailChimp Salesforce App. Only thing that sucks about this app is that it creates records that are populating our database. I manually export records and do a delete through Jitterbit or ...
4
votes
3answers
99 views

Test Apex Code: How to emulate a SOQL call that has a related object?

For Apex testing, I'm trying to create an object that is the same as the one created with a SOQL statement (see following method). The method retrieves the Quote_To_Lease__c object from Salesforce ...
1
vote
2answers
28 views

Using a Workflow Rule to notify of Contact changes

Is there a way to create a workflow rule to send an email every time a contact's last name change or home address changes? Or would I need to create a trigger for this?
1
vote
3answers
89 views

Batch Class shoudnt go to execute on certain condition

I have a logic in which sometimes I dont need to execute a batch class execute method. How to achieve this as we cannot pass null or whitespace in query locator
0
votes
0answers
34 views

How to calculate Calculate max end date inTask Recurrence

I am creating a custom VF page for tasks. In the page one Recurrence field option is available. In this we can give the task a start date and end date. In the end date we can calculate max end date, ...
0
votes
0answers
33 views

Save values on the form or wizard without creating custom object

I am creating a wizard in which I have created a VF page which consist of rules. I want to store this rules, so that when user opens this wizard again I can get all the rules he has used before. ...
-1
votes
2answers
64 views

Too Many SOQL Queries 101 though limit 100 [duplicate]

I am getting this error though limit 100 is provided in SOQL statement.Can someone please suggest a way out here? Apex code: public class Attachments_11{ public List<attachmentCaseWrapper> ...
2
votes
2answers
44 views

Unable to Open VF Page using PageReference for given URL

I have called NextStep() on Button Click where I wanted to open a standard VF page provided by SF with some new additional parameters in URL - where my string MergeURL is just fine, but it gets ...
0
votes
0answers
35 views

Test class for trigger

I have below trigger on feeditem which i tried for test class to write am unable to cover all the fields in the trigger .because of that unable to meet criteria of salesforce. trigger ...
0
votes
1answer
32 views

Error “Initial term of field expression must be a concrete SObject: LIST” when fetching values from list

Can someone please help me here?I have the piece of code here alongwith the error I am facing. Apex class:Code snippet: Map<Id,Attachment> mapCaseAttachments = new Map<Id,attachment>(); ...
0
votes
1answer
30 views

How to create a table which contains the data entered in the input text?

I have created an input form. The input form fields are Name, Status, Start time and End time which are the fields of Deliverable object. On click of Add button the values entered in the input text ...
0
votes
2answers
40 views

How to write && in apex if statement?

In apex, what is a proper way to write && condition? trigger CreatePTOEvent on Thrive_HR_PTO_Request__c (after insert) { // Event is created when PTO Request record is created ...
1
vote
2answers
34 views

How to get the selected radiobutton value in apex?

I have use the following code I would like to get the radiobutton value in the apex. I have checked the one option button and click the button (to call the method OptionVlaue()) I have checked the ...
2
votes
1answer
24 views

Related Event not showing up on Custom Object Related List

I am trying to auto create Salesforce Event record when a custom object is created And here is my code: trigger CreatePTOEvent on Thrive_HR_PTO_Request__c (after insert) { // Event is created when ...
3
votes
1answer
29 views

Programmatically Create Record Type

Is it possible to programmatically create a record type in Apex to be used in a test?
-2
votes
1answer
32 views

Save method not working

I have a vf page. I'm unable to add a save method to it. I have a few fields on visualforce page. I am able to write a save method for it. Here my code so far. public class ...