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

learn more… | top users | synonyms

0
votes
0answers
6 views

To send Email on Button Cick

I am not able to send email using the following code. Can someone suggest where am i going wrong? <apex:page StandardController="Order__c" extensions="SendEmail"> <apex:pageblock ...
-1
votes
0answers
23 views

Opportunity Trigger [on hold]

I need to write a trigger for an opportunity that is imported via Data Loader to insert the contact and account fields from a custom field. I haven't written a trigger before and having difficulty in ...
3
votes
1answer
23 views

Why i get “An error occurred when processing your submitted information.” after a standard field validaton?

I have 3 inputfields from Account object in a pageblock table: personemail personbirthdate personmobilephone If i type a misformatted email address (for eg. missing @ sign) or birthdate than i ...
2
votes
1answer
22 views

How to use Pattern matching in test class for email field?

I am using pattern matchers for the email filed in contact in my development. When writting the test i am getting error in that patter matches.Here i have method the error line.Kindly help me to ...
2
votes
0answers
27 views

standardsetcontroller getrecords() immutable list

In here Getrecords its says regarding getrecords method of standardsetcontroller as Returns the list of sObjects in the current page set. This list is immutable, i.e. you can't call clear() on ...
4
votes
1answer
50 views

JSON.deserializeUntyped returns “unrecognized token: 'NULL'”, when JSON token has a null value

We're creating our JSON responses to my salesforce callouts in house, so I'm guessing the issue has to do with how we're representing NULL in the JSON response. Here's a snippet of the response SF ...
1
vote
0answers
20 views

Save changes to Visualforce page in detail page

I have a Visualforce page that has been added to the detail layout. When I make changes to files in the visualforce page the save button is not enabled. It does happen for any other field added to the ...
2
votes
3answers
41 views

How to find all numbers in a string using Regex

I am trying to extract all numbers from a string but I got the below code to work although it stops after the first match for 123. String str = '123-456/7890'; Pattern p = Pattern.compile('(\\d+)'); ...
3
votes
0answers
14 views

Entitlement Management Disappeance

Early sometime today or late last night, Entitlement Management, and every related object like Service Contracts disappeared, along with all their records, etc. I had many visualforce and Apex classes ...
0
votes
1answer
27 views

How to access custom setting url field in apex?

How to access custom setting url field in apex.In my class i have a link in success message "Create Record". when user click the link it will diplay the site page.My problem is how to access the url ...
2
votes
1answer
39 views

Apex Trigger to populate custom field on Contract Object with value on contact object

I have a question for you knowledgeable people On the contract object we have a field called “Client Director” which is a look up to the contact record. Field: Client Director field api : ...
0
votes
1answer
36 views

How can I make my trigger only fire after all (of several thousand) records are finished being inserted?

I have a batch apex class that I need to fire only after all of the thousands of records from a record import have been inserted into a custom object. I thought I should use a trigger to fire my ...
0
votes
2answers
24 views

Field Update on Button click Using JavaScript

My field is not getting updated for Owner Id on Case Object {!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")} var caseObj = new sforce.SObject("Case"); ...
0
votes
1answer
16 views

Page lifecycle reading query parameters and executing

I have a working view and controller. I've added a custom link to accounts/leads that passes the id and type in the query string to an page and here the controller should then load some data according ...
-2
votes
1answer
24 views

System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING in test class

Class: public class CreatePurchaseorder{ public Purchase_order_setting__c pos {get;set;} public boolean isInput{get;set;} public id poid{get;set;} public boolean isUpdt{get;set;} ...
0
votes
1answer
16 views

How to refresh the parent Page from an inline Page on Click of Some Custom button [on hold]

I have to refresh the parent Page from an inline Page on Click of Some Custom button. This is an embedded inline VFP. Please suggest. I am looking for something like <apex:commandButton ...
-1
votes
0answers
21 views

I need solution for this requirement in vf/apex [on hold]

System should provide ability at step 5 of quote creation process, to place a check box, which gives user flexibility to copy his selection from one equipment to other equipment. But other equipment ...
0
votes
1answer
26 views

how to write test class for below apex class [on hold]

public with sharing class TaskController { Public String PageId{get;set;} Public Task Task{get;set;} public TaskController(ApexPages.StandardController controller) { ...
3
votes
1answer
32 views

Optimize Comparison of Records of same object with different record types

I have one object XYZ__c having two record types say A and B. I need to create junction Object JUNC__c(Fields: A__c(Lookup-XYZ__z),B__c(Lookup-XYZ__c)) record if XYZ__c record fields are same. I ...
1
vote
0answers
17 views

Compile error for datatype mismatch

Friends, I am getting below error on this line: if(dt.start_date_oapi__c.month()== todaydate.month() && dt.Year_OAPI__c == todaydate.year()){ dt.RecordTypeId = ...
5
votes
1answer
30 views

Displaying records side by side in one screen, in different modes

I want to display two opportunities side by side, so my users can compare them, and i can do that easily with <apex:detail> When they're both in view mode, it looks great. However, I want it to ...
4
votes
0answers
19 views

Recreate the Salesforce Multi-Picklist Element

Short question: How can I recreate the SelectFitlerElement or dual_select using Visualforce elements and javascript? Long question: I am trying to improve a Visualforce page that allows you to ...
1
vote
1answer
10 views

render Account page element based on Account team or User record field

Trying to return true for renderELEMENT based on the user being either on the AccountTeam OR having a field checked on their user record. Able to produce based on just either part, but Not able to ...
2
votes
1answer
26 views

How to display a list of all object types in Salesforce instance

I am trying to get a VisualForce page to display a SelectList of every object type in a Salesforce instance. Account, Contact, etc. I am using Schema.getGlobalDescribe()but am running into an issue ...
1
vote
2answers
22 views

I keep getting this error: Illegal assignment from LIST<Event__c> to String

Here's my code: public class MySessionRequestController{ transient public String sessions; public String getSessions(){ if (sessions == null){ sessions = [SELECT name, Sponsor_Name__c, ...
3
votes
0answers
13 views

Creating Idea Votes from portal user in Test code. DML Exception

I Wrote a very simple VF Page and Controller to show the Accounts that voted on certain Ideas. Here is the controller. Just aggregates the Up and Down votes on the Idea excluding internal votes. ...
0
votes
1answer
44 views

Two action function from one commandbutton

I have implemented prev << next>> buttons also.. which will show me resultset part by part along with the sphere.. i've used SOQL Offset-limit logic..but the problem is when clicking ...
1
vote
1answer
22 views

Upsert using wrapper class? Products not getting selected after checking the checkbox

I have written the following code to upsert the selected records using Wrapper classes. But I am getting Null Pointer exception . I am not understanding what I have missed. Please suggest. How can I ...
1
vote
1answer
22 views

VF Controller search logic

The following is my controller for my VF page that is going to search for certain Super Customers. On every Account there is a field called Super_Customer1__c, and since Super_Customer1__c will often ...
4
votes
2answers
32 views

Query returns Null in Apex code, but runs correctly in Execute Anonymous

This issue is tormenting me for several hours . I am trying to populate an AggregateResult list with the results of a query, but the query returns only nulls. The SAME CODE, run in Execute Anonymous, ...
1
vote
3answers
28 views

How to display an SOQL query in apex Datatable

I'm having a difficult time finding what (I think) should be a relatively simple procedure. I would like to create a class controller that returns a SOQL query and then display the results in an apex ...
0
votes
0answers
9 views

Onchange lookup field while hidden

OK I have lookup field that when you select a related opportunity it trigger the onchange actionSupport to call a "populateRelatedFields" function which populates another textbox. This works fine. ...
-2
votes
0answers
28 views

Apex Class issue

I have the following requirement. When user goes on leave, he assigns his events to another user. When the original user is on leave, tasks created for him should get assigned to the other user. In my ...
0
votes
0answers
30 views

Saving Dynamic rows to an Object on checking the checkbox

I have an Order Object , Product and a Junction Object OrderProduct. I have used as inline vf in Order Detail page and I want to capture the Product Details in that Inline VF and then save the Order ...
0
votes
0answers
13 views

Currency Conversion wrong [duplicate]

I'm trying to populate the sum(total selling price)of child object on to the "total order item value"{currecny data type field} of parent object. Here is the code trigger Rollup on OSF_Order_Items__c ...
-1
votes
0answers
30 views

sales force test class

i wrote one class and for that test class also created.. class: public class FRsubPrjCtrl{ Public Project__c pln{get;set;} public Allocation_amount__c sub; public ...
0
votes
1answer
13 views

I want to start new line after .(dot) symbol. How can I achieve this

I'm copying data from RichText Area field to Text Area field,When I copied in Text area field,The data is displaying with HTML tags. So used below code to convert, ...
2
votes
0answers
17 views

Is it possible for a popup window to appear after a validation rule returns false?

We need a validation rule to check if a entered value is not twice as large as the average of the last three years. If the validation rule returns false, there should be a popup window displaying the ...
1
vote
1answer
18 views

Documentation And Code Review Checklist for Apex Code and Unit Testing in Salesforce

How to make documentation for Apex code written in salesforce application and for unit testing done in salesforce ? Does Salesforce provide Code Review Checklist for Apex and Visualforce Code ? If ...
0
votes
0answers
15 views

comparing two same fields in different pages in visualforce [on hold]

I have A field in one page and same field Another page. How can i compare in visualforce or apex ?
1
vote
0answers
28 views

Requirement in Visualforce and apex

We have total 9 steps, In step 4 : We have some check box options like A, B, C, D , E, F, G. We have selected A B C D In that we have two fields like unit level (text) and service level (Pick list). ...
3
votes
0answers
18 views

Can you build a symbol table from a VF page?

Is there a parser for a VF page that will build a symbol table? I'd like to know what external references exist so I can tell what public variables and methods are unused in a project. Looks like ...
0
votes
0answers
14 views

System.CalloutException: public-proxy20-0-chi.data.sfdc.net

Never seen this error before. It's occurring sporadically when calling an asynchronous call from a Batch. This code has been executing without this issue for years on the same scheduled job. Seems ...
0
votes
1answer
29 views

Salesforce APEX Test - How do I do one?

I have been trying to do numerous tests and I can't get one to work. Have downloaded some code to allow me to use multiple controllers on my visualforce page from SteveBower Multi standard controlers ...
4
votes
0answers
15 views

Primary contact's email of the Organization

Does anybody know how to obtain primary contact for the Organization? The object itself has a field PrimaryContact, but that's a text field not a reference. Any ideas better than SELECT Id, Email FROM ...
1
vote
2answers
19 views

Calculating Fields in Controller - Better Ways?

Thanks for your eyes on my issue. I'm hoping to get feedback on a better way to approach a solution! Here's my situation: I have a Visualforce page and corresponding controller that looks at a series ...
0
votes
2answers
22 views

VF Controller Test Class

I have been trying to create a test class for my controller for my visual force page and I am not grasping the concepts behind it, can someone help me get started? I have tried a few things but I have ...
1
vote
1answer
46 views

Display sum of values dynamically entered by users in a table column

Requirement is display a table should have ability to add new row and also need to display dynamic sum of each column when user enters value with in a row column. Something like the below table. How ...
1
vote
2answers
24 views

For an Inline Vf Page how can I get the id of the current object?

For an Inline Vf Page how can I get the id of the current object. I want to have the current object id . how can i retieve it use for an inline vf page. I am embedding it in an Object A while the VF ...
2
votes
3answers
31 views

Salesforce APEX: Propagating a custom exception error to the record page

Propagating a custom exception error to the record page Hi, I have a Visualforce page embedded into an Opportunity page layout. Interacting with this page results in an Opportunity update trigger ...