Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 7218

Questions relating to Apex, the native programming language for the Force.com platform. Use it for general questions on syntax, errors, constructs, and rules of use. Most questions should include a code *excerpt* to help answerers understand specifically what has gone wrong or why you need help.

1 vote

How to render a panel with some Error message

Do something like this <apex:page controller="message"> <apex:pagemessages /> <apex:form > <apex:pageblock > <apex:commandButton action="{!doSomething}" value="Save" /> <apex:outputPanel …
Salesforce developer's user avatar
3 votes
1 answer
865 views

New Page not opening with the help of pagereference

After execution of javascript function i want to open a detail page of an account in a new apex window. for that i am writing like below <input type="button" value="Save" onclick="saveImage()"/> <apex …
Salesforce developer's user avatar
0 votes
1 answer
1k views

prepopulate date using inputfield in apex

I have a custom field of date in opportunity . i need to display the date in visualforce page using inputfield, so that i can edit and save the form later. for that i am doing visualforce page …
Salesforce developer's user avatar
1 vote
1 answer
3k views

PageBlockTable not reRendering correctly after commandButton click

I has to reRender the pageblocktable after commandButton click. I am displaying custom object values in a pageblocktable. There is another pageblock to insert new record into the object along with a c …
Salesforce developer's user avatar
1 vote
Accepted

PageBlockTable not reRendering correctly after commandButton click

I changed my controller to run succesfully public with sharing class orgtestController { public orgtestController() { } public PageReference create() { renders=true; organization__c newOrg …
Salesforce developer's user avatar
3 votes
2 answers
12k views

Passing Data from one page to other page in visualforce

e.empDet.Salary__c}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> Apex Controller public with sharing class wrapCustomObj { public Integer limitSize=5; public Integer … { OffsetSize=OffsetSize+limitSize; } public void previous() { OffsetSize=OffsetSize-limitSize; } public PageReference DisplayDetails() { PageReference reRend = new PageReference('/apex
Salesforce developer's user avatar
0 votes
1 answer
778 views

how to write trigger on before update for a custom field in a same custom object

I had three custom fields like available_casual_leaves__c,available_sick_leaves__c and days_off __c on leave_request__c object. the default values of available_Casual_leaves__c is 20 and available_sic …
Salesforce developer's user avatar
0 votes
2 answers
2k views

Auto Populate parent Values in child fields using trigger

I have two objects Employee__C (Parent) and Leave_Request__c(Child) [M-D Relationship] Employee__c has the fields: available_casual_leaves__c (Number(15,0)) avilable_sick_leaves__c (Num …
Salesforce developer's user avatar
1 vote
2 answers
549 views

Write a test class without DML statements

How can I write a test method for the following class? public Class checkRecursive { private static boolean run = true; public boolean runOnce() { if (run) { run = false; retu …
Salesforce developer's user avatar
2 votes
1 answer
1k views

Bind datepicker value from visualforce page to controller

How to bind the datepicker value to controller. I used onfocus="DatePicker.pickDate" but it was not displaying datepicker in sandbox so i am using as below. <apex:page standardController="SFDC_Emplo …
Salesforce developer's user avatar
1 vote
2 answers
3k views

field value not updating using before trigger

I am trying to update the field value in a record using a before trigger, but it was not updating as expected. trigger opMetricsTrigger on Operational_Metrics__c (before insert,before update) { …
Salesforce developer's user avatar
0 votes
1 answer
880 views

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY on afterUpdate using trigger

I want to update record after insert and after update , i am writing trigger trigger opMetricsTrigger on Operational_Metrics__c (after insert,after update) { Operational_Metrics__c[] op=null; Set< …
Salesforce developer's user avatar
1 vote

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY on afterUpdate using trigger

I solved my issue using a static Boolean variable: public class TriggerContext{ private static boolean firstRun = true; public static boolean isFirstRun() { return firstRun; } …
Salesforce developer's user avatar
0 votes
1 answer
127 views

Duplicate ID in After Update Trigger

I am writing a trigger to copy childs field value into parent field value. Let say operational_metrics__c is a parent object and contacts is its child object with lookup relation ship. Contact object …
Salesforce developer's user avatar
2 votes
Accepted

How to display Calendar on Visualforce page?

dat}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page> Apex Controller: public class Sample { public Date dat {get;set; …
Salesforce developer's user avatar

15 30 50 per page