-
ChatterFeed
-
1Best Answers
-
0Likes Received
-
0Likes Given
-
9Questions
-
18Replies
- PJaya
- September 24, 2016
- Like
- 0
Dependent Picklist values when the picklist refereing to global picklist
I have tried to get the dependentfield.getPicklistValues(); everything is working fine
but now i have changed the dependent picklist field to look on the global picklist, so when i am refering to global picklist its failing
- PJaya
- June 23, 2016
- Like
- 0
User details in above the hierarchy
Hi All, can tell me how do i get the all the user details above me in the hirerarchy
example :
1--->>-- 2,3 ---4,5--4--6,5--7-----8--9--10
when ever user 8 act's on account, i need to get all the users details above him
in the above case all users are 1,2 3,4,5,6,7,
can any one help m on this .
Thanks in advance.
- PJaya
- April 26, 2013
- Like
- 0
Rerender issue to display the dynamic data with the mandatory feild in the rerender panel
hi friends,
iam using rerender to display 2 output panels <apex:page controller="ClusterVfController">
action support is calling the controller for first time coreectly.
when i try to change the data without selecting the data for mandat feils the controller is not called and the old data is populated only how can i overcome this.
here is my Vf page
<apex:form >
<apex:messages />
<apex:pageblock title="Company Movement">
<apex:pageblockSection title="SME Logo1 ">
<apex:outputLabel id="Logo1" value="Logo1:">
<apex:inputField id="log" value="{!log.SME_Logo1__c}">
<apex:actionSupport event="onchange" action="{!Accwrappermethod}" reRender="ParentChildDts,xyz"/>
</apex:inputField>
</apex:outputLabel>
</apex:pageblockSection>
<apex:outputPanel id="ParentChildDts" >
<apex:outputPanel rendered="{!isnotblank}">
<apex:pageBlockTable value="{!accwrapperlist}" var="accwr" id="AccTable">
<apex:column >
<apex:facet name="header">
<apex:inputCheckbox >
<apex:actionSupport event="onclick" onsubmit="checkAll(this)" reRender=""/>
</apex:inputCheckbox>
</apex:facet>
<apex:inputCheckBox value="{!accwr.isSelected}" id="testchk"/>
</apex:column>
<apex:column headerValue="Account ID" width="45%">
{!accwr.acc1.Id}
</apex:column>
<apex:column headerValue="Account Name" width="25%">
{!accwr.acc1.Name}
</apex:column>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel id="xyz">
<apex:pageblockSection title="SME Logo2 " rendered="{!isnotblank}">
<apex:outputLabel id="Logo2" value="Logo2:">
<apex:inputField id="log2" required="true" value="{!log2.SME_Logo1__c}"/>
</apex:outputLabel>
<apex:commandButton value="Transfer" action="{!transferaccount}"/>
</apex:pageblockSection>
</apex:outputPanel>
</apex:pageblock>
</apex:form>
<script>
function checkAll(cb)
{
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++)
{
if(inputElem[i].id.indexOf("testchk")!=-1)
inputElem[i].checked = cb.checked;
}
return false;
}
</script>
</apex:page>
Here is my controller on custom object
public class ClusterVfController{
public boolean isnotblank{get;set;}
// Declare one wrapper class to maintain checkbox status
public class accWrapper {
public Account acc1{get;set;}
public Boolean isSelected { get; set; }
public accWrapper() {
acc1= new Account();
isSelected = false;
}
public accWrapper(Account acc1, Boolean isSelected) {
this.acc1=acc1;
this.isSelected = isSelected;
}
}
public ClusterVfController(){
log = new Logo__c();
log2 = new Logo__c();
isnotblank=false;
system.debug('=====LogoController=========isnotblank==================='+isnotblank);
}
public Map<Id, Account> SelctParentLogomap = new Map<Id, Account>();
public Logo__c log{get;set;}
public Logo__c log2{get;set;}
public List<accWrapper> accwrapperlist{get;set;}
public String getLog() {
system.debug('=======getLog=======isnotblank==================='+isnotblank);
return null;
}
public void accwrappermethod(){
accwrapperlist = new List<accWrapper>();
system.debug('save===log======'+log);
selctParentLogomap =new Map<Id, Account>([Select id,name from Account where ParentId=:log.SME_Logo1__c]);
system.debug('+++++++++++SelctParentLogomap ++++++++:::::'+ SelctParentLogomap.size());
for(Account acc1: SelctParentLogomap.values()){
accwrapperlist.add(new accWrapper(acc1,false));
}
if(accwrapperlist.size()>0){
isnotblank=true;
}else{
isnotblank=false;
}
system.debug('===================isnotblank========='+isnotblank);
//return accwrapperlist;
}
public pageReference transferaccount (){
system.debug('save===log2======'+log2);
system.debug('&&&log2 ---------------------OwnerId&&&'+log2.ownerid);
Account acc2 =[select id,ownerid from account where id=:log2.SME_Logo1__c];
system.debug('save===acc2 id======'+acc2.id);
list<Account> acclist=new list<Account>();
for(accWrapper wrap1: accwrapperlist){
if(wrap1.isSelected==true){
wrap1.acc1.OwnerId=acc2.ownerid;
acclist.add(wrap1.acc1);
}
}
try{
system.debug('****acclist*****'+acclist);
update acclist;
}catch(Exception e){
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL,e.getMessage()));
}
PageReference assignmentpage = ApexPages.currentPage();
assignmentpage.setRedirect(true);
return null;
}
}
Thanks in advance
- PJaya
- April 02, 2013
- Like
- 0
working in IE but not working in Firefox
<apex:inputField id="log" value="{!log.SME_Logo1__c}">
<apex:actionSupport event="onselect" action="{!Accwrappermethod}" rerender="ParentChildDts"/>
</apex:inputField>
- PJaya
- March 20, 2013
- Like
- 0
List has no rows for assignment to SObject
here is my Apex class
global class Lead_Conversion { (here the base on the id query is fetched but while executing the query its raising this error plz help me out)
My Test Class is ===============
@isTest (SeeAllData = true)
|
- PJaya
- January 08, 2013
- Like
- 0
Getting Entity Locked error in Test method Approval Process
- PJaya
- December 26, 2012
- Like
- 0
Related List As Attachments
developed an visual force page and renderas PDF in which dispaying the Related list NotesandAttcahments
when i save that PDF iam unable to read the notesandattachments related list data on click on the view its asking for sales force login
here is my code can u plz help me out
<apex:page standardController="Account" renderAs="PDF">
<apex:pageBlock >
You're looking at some related lists for {!account.name}:
</apex:pageBlock>
<apex:relatedList list="NotesandAttachments"/>
<apex:relatedList list="Opportunities" />
<apex:relatedList list="Contacts">
<apex:facet name="header">Titles can be overriden with facets</apex:facet>
</apex:relatedList>
<apex:relatedList list="Cases" title="Or you can keep the image, but change the text"/>
</apex:page>
- PJaya
- April 16, 2012
- Like
- 0
how to write trigger on Oppurtunity related list Sales team object
how to write trigger on Oppurtunity related list Sales team object
- PJaya
- October 13, 2011
- Like
- 0
- PJaya
- September 24, 2016
- Like
- 0
User details in above the hierarchy
Hi All, can tell me how do i get the all the user details above me in the hirerarchy
example :
1--->>-- 2,3 ---4,5--4--6,5--7-----8--9--10
when ever user 8 act's on account, i need to get all the users details above him
in the above case all users are 1,2 3,4,5,6,7,
can any one help m on this .
Thanks in advance.
- PJaya
- April 26, 2013
- Like
- 0
Rerender issue to display the dynamic data with the mandatory feild in the rerender panel
hi friends,
iam using rerender to display 2 output panels <apex:page controller="ClusterVfController">
action support is calling the controller for first time coreectly.
when i try to change the data without selecting the data for mandat feils the controller is not called and the old data is populated only how can i overcome this.
here is my Vf page
<apex:form >
<apex:messages />
<apex:pageblock title="Company Movement">
<apex:pageblockSection title="SME Logo1 ">
<apex:outputLabel id="Logo1" value="Logo1:">
<apex:inputField id="log" value="{!log.SME_Logo1__c}">
<apex:actionSupport event="onchange" action="{!Accwrappermethod}" reRender="ParentChildDts,xyz"/>
</apex:inputField>
</apex:outputLabel>
</apex:pageblockSection>
<apex:outputPanel id="ParentChildDts" >
<apex:outputPanel rendered="{!isnotblank}">
<apex:pageBlockTable value="{!accwrapperlist}" var="accwr" id="AccTable">
<apex:column >
<apex:facet name="header">
<apex:inputCheckbox >
<apex:actionSupport event="onclick" onsubmit="checkAll(this)" reRender=""/>
</apex:inputCheckbox>
</apex:facet>
<apex:inputCheckBox value="{!accwr.isSelected}" id="testchk"/>
</apex:column>
<apex:column headerValue="Account ID" width="45%">
{!accwr.acc1.Id}
</apex:column>
<apex:column headerValue="Account Name" width="25%">
{!accwr.acc1.Name}
</apex:column>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel id="xyz">
<apex:pageblockSection title="SME Logo2 " rendered="{!isnotblank}">
<apex:outputLabel id="Logo2" value="Logo2:">
<apex:inputField id="log2" required="true" value="{!log2.SME_Logo1__c}"/>
</apex:outputLabel>
<apex:commandButton value="Transfer" action="{!transferaccount}"/>
</apex:pageblockSection>
</apex:outputPanel>
</apex:pageblock>
</apex:form>
<script>
function checkAll(cb)
{
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++)
{
if(inputElem[i].id.indexOf("testchk")!=-1)
inputElem[i].checked = cb.checked;
}
return false;
}
</script>
</apex:page>
Here is my controller on custom object
public class ClusterVfController{
public boolean isnotblank{get;set;}
// Declare one wrapper class to maintain checkbox status
public class accWrapper {
public Account acc1{get;set;}
public Boolean isSelected { get; set; }
public accWrapper() {
acc1= new Account();
isSelected = false;
}
public accWrapper(Account acc1, Boolean isSelected) {
this.acc1=acc1;
this.isSelected = isSelected;
}
}
public ClusterVfController(){
log = new Logo__c();
log2 = new Logo__c();
isnotblank=false;
system.debug('=====LogoController=========isnotblank==================='+isnotblank);
}
public Map<Id, Account> SelctParentLogomap = new Map<Id, Account>();
public Logo__c log{get;set;}
public Logo__c log2{get;set;}
public List<accWrapper> accwrapperlist{get;set;}
public String getLog() {
system.debug('=======getLog=======isnotblank==================='+isnotblank);
return null;
}
public void accwrappermethod(){
accwrapperlist = new List<accWrapper>();
system.debug('save===log======'+log);
selctParentLogomap =new Map<Id, Account>([Select id,name from Account where ParentId=:log.SME_Logo1__c]);
system.debug('+++++++++++SelctParentLogomap ++++++++:::::'+ SelctParentLogomap.size());
for(Account acc1: SelctParentLogomap.values()){
accwrapperlist.add(new accWrapper(acc1,false));
}
if(accwrapperlist.size()>0){
isnotblank=true;
}else{
isnotblank=false;
}
system.debug('===================isnotblank========='+isnotblank);
//return accwrapperlist;
}
public pageReference transferaccount (){
system.debug('save===log2======'+log2);
system.debug('&&&log2 ---------------------OwnerId&&&'+log2.ownerid);
Account acc2 =[select id,ownerid from account where id=:log2.SME_Logo1__c];
system.debug('save===acc2 id======'+acc2.id);
list<Account> acclist=new list<Account>();
for(accWrapper wrap1: accwrapperlist){
if(wrap1.isSelected==true){
wrap1.acc1.OwnerId=acc2.ownerid;
acclist.add(wrap1.acc1);
}
}
try{
system.debug('****acclist*****'+acclist);
update acclist;
}catch(Exception e){
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL,e.getMessage()));
}
PageReference assignmentpage = ApexPages.currentPage();
assignmentpage.setRedirect(true);
return null;
}
}
Thanks in advance
- PJaya
- April 02, 2013
- Like
- 0
Table not appearing in VFPage
This table is not appearing when I render the vfpage. What do I need to change in my vf page?
<apex:page standardcontroller="PCN_s__c" extensions="pcntable" > <apex:form > <apex:pageBlock > <apex:repeat value="{!pcnlist}" var="pcn" > <table> <tr> <td> <apex:outputlabel value="Project Impact"/> </td> <td> <apex:outputlabel value="Current Project"/> </td> <td> <apex:outputlabel value="Revised Project"/> </td> <td> <apex:outputlabel value="Change"/> </td> <td> <apex:outputlabel value="Approved"/> </td> </tr> <tr> <td> <apex:outputlabel value="PROD. LABOR HOURS & COST:"/> </td> <td> <apex:inputfield value="{!pcn.Current_PROD_LABOR_HOURS__c}"/> <apex:inputfield value="{!pcn.Current_PROD_LABOR_COST__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_PROD_LABOR_HOURS__c}"/> <apex:inputfield value="{!pcn.Revised_PROD_LABOR_COST__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="ENG. LABOR HOURS & COST:"/> </td> <td> <apex:inputfield value="{!pcn.Current_ENG_LABOR_HOURS__c}"/> <apex:inputfield value="{!pcn.Current_ENG_LABOR_COST__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_ENG_LABOR_HOURS__c}"/> <apex:inputfield value="{!pcn.Revised_ENG_LABOR_COST__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="MATERIAL COST:"/> </td> <td> <apex:inputfield value="{!pcn.Current_MATERIAL_COST__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_MATERIAL_COST__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="PRINT RELEASE DATE:"/> </td> <td> <apex:inputfield value="{!pcn.Current_PRINT_RELEASE_DATE__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_PRINT_RELEASE_DATE__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="SCHED. SHIP DATE:"/> </td> <td> <apex:inputfield value="{!pcn.Current_SCHED_SHIP_DATE__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_SCHED_SHIP_DATE__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="ADDITIONAL COMPONENTS:"/> </td> <td> <apex:inputfield value="{!pcn.Current_ADDITIONAL_COMPONENTS__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_ADDITIONAL_COMPONENTS__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="TOTAL COST:"/> </td> <td> <apex:inputfield value="{!pcn.Current_TOTAL_COST__c}"/> </td> <td> <apex:inputfield value="{!pcn.Revised_TOTAL_COST__c}"/> </td> </tr> <tr> <td> <apex:outputlabel value="SELLING PRICE:"/> </td> <td> <apex:inputfield value="{!pcn.Current_SELLING_PRICE__c}"/> </td> <td> <apex:inputfield value="{!pcn.RevisedSELLING_PRICE__c}"/> </td> </tr> </table> </apex:repeat> </apex:pageBlock> </apex:form> </apex:page>
- ckellie
- April 01, 2013
- Like
- 0
working in IE but not working in Firefox
<apex:inputField id="log" value="{!log.SME_Logo1__c}">
<apex:actionSupport event="onselect" action="{!Accwrappermethod}" rerender="ParentChildDts"/>
</apex:inputField>
- PJaya
- March 20, 2013
- Like
- 0
List has no rows for assignment to SObject
here is my Apex class
global class Lead_Conversion { (here the base on the id query is fetched but while executing the query its raising this error plz help me out)
My Test Class is ===============
@isTest (SeeAllData = true)
|
- PJaya
- January 08, 2013
- Like
- 0
Related List As Attachments
developed an visual force page and renderas PDF in which dispaying the Related list NotesandAttcahments
when i save that PDF iam unable to read the notesandattachments related list data on click on the view its asking for sales force login
here is my code can u plz help me out
<apex:page standardController="Account" renderAs="PDF">
<apex:pageBlock >
You're looking at some related lists for {!account.name}:
</apex:pageBlock>
<apex:relatedList list="NotesandAttachments"/>
<apex:relatedList list="Opportunities" />
<apex:relatedList list="Contacts">
<apex:facet name="header">Titles can be overriden with facets</apex:facet>
</apex:relatedList>
<apex:relatedList list="Cases" title="Or you can keep the image, but change the text"/>
</apex:page>
- PJaya
- April 16, 2012
- Like
- 0
How to render a output panel in action support
Hi,
I displayed all records of an object in visualforce page.
I kept commandlink for a column in VF page.
I wrote a action support on mouseover that means a panel will get displayed with the details of a record, when i place mouse on particular record.
I have tried but i was unable to get it.
Can any one help me out?
Thanks & Regards,
Raju.b
- raju.B
- June 02, 2011
- Like
- 0