• Meer Salman
  • NEWBIE
  • 50 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 20
    Replies

Hi,

 

I have a Controller in which i have a property as following:

 

public class test

{

public string mystr {get; set;}

}

 

I have a VFPage for this controller now I want to set the property on the click event of outputlink how can I set the property? I know how to get the value fromt he property but I am a bit confuse in setting a property via VFPage.

 

<apex:page controller = 'test'>

<apex:form>

<apex:outputlink value="xyz" onclick???>Meer</outputlink>

</apex:form>

</apex:page>

 

 

Regards,

Meer Salman

Hi,

 

This is a bit complicated issue so let me write in steps:

 

1) I created a Custom Object and overide its Detail View and New page by my own VFPages.

 

2) I wanted to have another header tab for the same object so I created a VFPage and add it as a tab by name 'Payment Journal'. It is as similar as the default tab layout of the custom object, however there are few changes.

 

3) In 'Payment Journal' Tab I have a pagetable in which some particular records are shown with their 'Name' in outputlink tag.

 

4) I want to show another VFPage for Detail Veiw when the outputlink is clicked.

 

5) I guess this can be done by giving the value to output link but I am not exactly getting how to give a value in this case.

 

NOTE: Remember I already have overidden the Detail Veiw thus, there are two Detail Veiw pages.

 

Hope it is clear now, Please help me in this I shall be very thankful.

Hi,

 

Can anyone tell me how can I have the similar VFPage as Home of any object? I have a custom object for which I am designing VFPage for View I want to have similar as the deafult layout, but couldn't find the way. Does anyone know how can I have it?

Hi,

 

Can I have two or more tabs for the same object? I have a custom object for which I have a tab, but for the same object I want to have another tab in which I'll show some other fields, the main task is to share the same object by two tabs.

Hi,

 

Is this possible to call the script functions on the events of a component or in <apex:actionsuppor>? I have the following function in a script which I want to be called on the 'onselect' event of the <apex:outputfeild>.

 

    <script type="text/javascript"> var __sfdcSessionId = '{!GETSESSIONID()}'; </script>
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"> </script>
    <script type="text/javascript">     
       
function ShowDescription(acc) 
        {
            var queryResult=sforce.connection.query(<my query>);
            var records=queryResult.getArray('records');
            document.getElementById(acc.id.replace("acc","desc")).value=records[0].Description__c; 
        }
        
    </script> 
    <apex:pageBlock mode="inlineEdit" title="Journal Detail" id="td">        
        <apex:pageBlockSection columns="2">
            <apex:outputField id="period_date" value="{!Journal.Period__c}">
                <apex:actionSupport event="onchange" action="ShowJournalDate(period_date)" rerender="journal_date"/>
            </apex:outputField>
            <apex:outputLabel />
            <apex:outputField id="journal_date" value="{!Journal.Journal_Date__c}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>

 

Regards,

Meer Salman

Hi..
I have a following PageBlock in my page. I wonder how can I acheive onchange event for output field and rerender another field when the value is changed?
In my case I have two custom fields Journal.Period__c and Journal.Journal_Date__c,  as you can see the PageBlock is in mode="inlineEdit" thus if I change the Journal.Period__c value i want to change the value for Journal.Journal_Date__c  accordingly. I have use <apex:inputField> tag to acheive my target but it doesn't give a nice look to the page so I was looking something like onchange event for <apex:outfield> or  <apex:outlabel> etc.
<apex:pageBlock mode="inlineEdit" title="Journal Detail">
        <apex:pageBlockSection columns="2">
            <apex:inputField id="period_date" value="{!Journal.Period__c}" onchange="ShowJournalDate(this)"/>
            <apex:outputLabel />
            <apex:inputField id="journal_date" value="{!Journal.Journal_Date__c}"/>
            <apex:outputLabel />
            <apex:outputField value="{!Journal.Card__c}"/>
            <apex:outputLabel ></apex:outputLabel>
            <apex:outputField value="{!Journal.Description__c}"/>        
        </apex:pageBlockSection>
</apex:pageBlock>
I wish there must be some solution for what I am looking for.
Regards,
Meer Salman

Hi..

 

Is it possible to call a function of extensions behind the event in a VisualForce Page?

 

I have the following page I want to put the getDescription() method on 'onselect' event of 

<apex:inputfield value="{!newLine.Code_Combination__c}" />

 

How can I achieve this??

 


 

<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
<apex:form >
<apex:pageBlock id="pb" mode="Edit">
    <apex:pageBlockButtons >
        <apex:commandButton value="Click" action="{!getDescription}" rerender="pb"/>
    </apex:pageBlockButtons>    
    <apex:PageBlockSection columns="1">
            <apex:inputfield value="{!newLine.Code_Combination__c}" />
            <apex:inputfield value="{!newLine.Description__c}"/>
    </apex:PageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Please help in this.
Regards,
Meer Salman
Hi,
I want to autofill one of the text field (Description text box)  when account code is selected. Following is the VFPage and a Controller. I am not getting any of the result when I select the accout code.  This is quite simple I belive, but I dont know where I am wrong. Please help me!
*********VFPage*********
<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
        
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getDescription()
        {    
            var queryresult = sforce.connection.query("SELECT Description__c FROM Code_Combination__c WHERE Name = '" + document.getElementById('{!$Component.MyForm:acc}').value + "'", queryresult);            
            var records = queryresult.getArray('records');
            document.getElementById('{!$Component.MyForm:desc}').value = records [0].Description__c;
        }
    </script>
      
    <apex:form id="MyForm">
         <b>
         <table>
             <tr>
                <td><apex:outputLabel >Account&nbsp;Code: </apex:outputLabel></td>
                <td><apex:inputField id="acc" value="{!newline.Code_Combination__c}" style="width:320px" onselect="{getDescription()}"/></td>
             </tr>
             <tr>   
                <td><apex:outputLabel >Description:&nbsp;&nbsp;&nbsp;&nbsp;</apex:outputLabel></td>
                <td><apex:inputField id="desc"  value="{!newline.Description__c}" style="width:320px"/></td>
             </tr>
             <tr>   
                <td></td>
                <td><apex:commandButton action="{!save}" value="Save" /></td>
             </tr>
         </table>
         </b>                         
    </apex:form>
</apex:page>
*********CONTROLLER*********
public class Fin_LineManager
    public Line__c newLine {get; set;}
   
    public Fin_LineManager(ApexPages.standardController stdn)
    {
       newLine  = new Line__c(Journal__c = ApexPages.currentPage().getParameters().get('id'));
    }   
    
    
    public PageReference Save()
    {            
       insert newLine;
       return null ;        
    }    
}
Regards,
Meer Salman
Hi,
I want to autofill one of the text field (Description text box)  when account code is selected. Following is the VFPage and a Controller. I am not getting any of the result when I select the accout code.  This is quite simple I belive, but I dont know where I am wrong. Please help me!
*********VFPage*********
<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
        
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getDescription()
        {    
            var queryresult = sforce.connection.query("SELECT Description__c FROM Code_Combination__c WHERE Name = '" + document.getElementById('{!$Component.MyForm:acc}').value + "'", queryresult);            
            var records = queryresult.getArray('records');
            document.getElementById('{!$Component.MyForm:desc}').value = records [0].Description__c;
        }
    </script>
      
    <apex:form id="MyForm">
         <b>
         <table>
             <tr>
                <td><apex:outputLabel >Account&nbsp;Code: </apex:outputLabel></td>
                <td><apex:inputField id="acc" value="{!newline.Code_Combination__c}" style="width:320px" onselect="{getDescription()}"/></td>
             </tr>
             <tr>   
                <td><apex:outputLabel >Description:&nbsp;&nbsp;&nbsp;&nbsp;</apex:outputLabel></td>
                <td><apex:inputField id="desc"  value="{!newline.Description__c}" style="width:320px"/></td>
             </tr>
             <tr>   
                <td></td>
                <td><apex:commandButton action="{!save}" value="Save" /></td>
             </tr>
         </table>
         </b>                         
    </apex:form>
</apex:page>
*********CONTROLLER*********
public class Fin_LineManager
    public Line__c newLine {get; set;}
   
    public Fin_LineManager(ApexPages.standardController stdn)
    {
       newLine  = new Line__c(Journal__c = ApexPages.currentPage().getParameters().get('id'));
    }   
    
    
    public PageReference Save()
    {            
       insert newLine;
       return null ;        
    }    
}
Regards,
Meer Salman

Hi,

 

This is a bit complicated issue so let me write in steps:

 

1) I created a Custom Object and overide its Detail View and New page by my own VFPages.

 

2) I wanted to have another header tab for the same object so I created a VFPage and add it as a tab by name 'Payment Journal'. It is as similar as the default tab layout of the custom object, however there are few changes.

 

3) In 'Payment Journal' Tab I have a pagetable in which some particular records are shown with their 'Name' in outputlink tag.

 

4) I want to show another VFPage for Detail Veiw when the outputlink is clicked.

 

5) I guess this can be done by giving the value to output link but I am not exactly getting how to give a value in this case.

 

NOTE: Remember I already have overidden the Detail Veiw thus, there are two Detail Veiw pages.

 

Hope it is clear now, Please help me in this I shall be very thankful.

Hi,

 

Can anyone tell me how can I have the similar VFPage as Home of any object? I have a custom object for which I am designing VFPage for View I want to have similar as the deafult layout, but couldn't find the way. Does anyone know how can I have it?

Hi,

 

Can I have two or more tabs for the same object? I have a custom object for which I have a tab, but for the same object I want to have another tab in which I'll show some other fields, the main task is to share the same object by two tabs.

Hi Guys,

 

I have this requirement, any idea how can I make use of checkboxes as radio buttons ? I don't need radio buttons

 

 

  • April 04, 2012
  • Like
  • 0

Hi All,

              I have a custom object called Tickets on which I have a VF Page. On this page I would like to show the list of records from a custom Object called Document Share which is on the related list of the Case object. Can someone tell me how to go about it. Thanks for your help.

 

  • April 04, 2012
  • Like
  • 0

Hi,

 

Is this possible to call the script functions on the events of a component or in <apex:actionsuppor>? I have the following function in a script which I want to be called on the 'onselect' event of the <apex:outputfeild>.

 

    <script type="text/javascript"> var __sfdcSessionId = '{!GETSESSIONID()}'; </script>
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"> </script>
    <script type="text/javascript">     
       
function ShowDescription(acc) 
        {
            var queryResult=sforce.connection.query(<my query>);
            var records=queryResult.getArray('records');
            document.getElementById(acc.id.replace("acc","desc")).value=records[0].Description__c; 
        }
        
    </script> 
    <apex:pageBlock mode="inlineEdit" title="Journal Detail" id="td">        
        <apex:pageBlockSection columns="2">
            <apex:outputField id="period_date" value="{!Journal.Period__c}">
                <apex:actionSupport event="onchange" action="ShowJournalDate(period_date)" rerender="journal_date"/>
            </apex:outputField>
            <apex:outputLabel />
            <apex:outputField id="journal_date" value="{!Journal.Journal_Date__c}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>

 

Regards,

Meer Salman

Hi..
I have a following PageBlock in my page. I wonder how can I acheive onchange event for output field and rerender another field when the value is changed?
In my case I have two custom fields Journal.Period__c and Journal.Journal_Date__c,  as you can see the PageBlock is in mode="inlineEdit" thus if I change the Journal.Period__c value i want to change the value for Journal.Journal_Date__c  accordingly. I have use <apex:inputField> tag to acheive my target but it doesn't give a nice look to the page so I was looking something like onchange event for <apex:outfield> or  <apex:outlabel> etc.
<apex:pageBlock mode="inlineEdit" title="Journal Detail">
        <apex:pageBlockSection columns="2">
            <apex:inputField id="period_date" value="{!Journal.Period__c}" onchange="ShowJournalDate(this)"/>
            <apex:outputLabel />
            <apex:inputField id="journal_date" value="{!Journal.Journal_Date__c}"/>
            <apex:outputLabel />
            <apex:outputField value="{!Journal.Card__c}"/>
            <apex:outputLabel ></apex:outputLabel>
            <apex:outputField value="{!Journal.Description__c}"/>        
        </apex:pageBlockSection>
</apex:pageBlock>
I wish there must be some solution for what I am looking for.
Regards,
Meer Salman

Hi..

 

Is it possible to call a function of extensions behind the event in a VisualForce Page?

 

I have the following page I want to put the getDescription() method on 'onselect' event of 

<apex:inputfield value="{!newLine.Code_Combination__c}" />

 

How can I achieve this??

 


 

<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
<apex:form >
<apex:pageBlock id="pb" mode="Edit">
    <apex:pageBlockButtons >
        <apex:commandButton value="Click" action="{!getDescription}" rerender="pb"/>
    </apex:pageBlockButtons>    
    <apex:PageBlockSection columns="1">
            <apex:inputfield value="{!newLine.Code_Combination__c}" />
            <apex:inputfield value="{!newLine.Description__c}"/>
    </apex:PageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Please help in this.
Regards,
Meer Salman

I Have a checkbox that the default checked is set in the object. I created a visualforce page with the checkbox. But when i hit the new button it is not checked. How do i make the default value checked. Thanks

 

<apex:inputCheckbox value="{!Debt_Info__c.Round_Payment__c}" />

 

Hi,
I want to autofill one of the text field (Description text box)  when account code is selected. Following is the VFPage and a Controller. I am not getting any of the result when I select the accout code.  This is quite simple I belive, but I dont know where I am wrong. Please help me!
*********VFPage*********
<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
        
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getDescription()
        {    
            var queryresult = sforce.connection.query("SELECT Description__c FROM Code_Combination__c WHERE Name = '" + document.getElementById('{!$Component.MyForm:acc}').value + "'", queryresult);            
            var records = queryresult.getArray('records');
            document.getElementById('{!$Component.MyForm:desc}').value = records [0].Description__c;
        }
    </script>
      
    <apex:form id="MyForm">
         <b>
         <table>
             <tr>
                <td><apex:outputLabel >Account&nbsp;Code: </apex:outputLabel></td>
                <td><apex:inputField id="acc" value="{!newline.Code_Combination__c}" style="width:320px" onselect="{getDescription()}"/></td>
             </tr>
             <tr>   
                <td><apex:outputLabel >Description:&nbsp;&nbsp;&nbsp;&nbsp;</apex:outputLabel></td>
                <td><apex:inputField id="desc"  value="{!newline.Description__c}" style="width:320px"/></td>
             </tr>
             <tr>   
                <td></td>
                <td><apex:commandButton action="{!save}" value="Save" /></td>
             </tr>
         </table>
         </b>                         
    </apex:form>
</apex:page>
*********CONTROLLER*********
public class Fin_LineManager
    public Line__c newLine {get; set;}
   
    public Fin_LineManager(ApexPages.standardController stdn)
    {
       newLine  = new Line__c(Journal__c = ApexPages.currentPage().getParameters().get('id'));
    }   
    
    
    public PageReference Save()
    {            
       insert newLine;
       return null ;        
    }    
}
Regards,
Meer Salman
Hi,
I want to autofill one of the text field (Description text box)  when account code is selected. Following is the VFPage and a Controller. I am not getting any of the result when I select the accout code.  This is quite simple I belive, but I dont know where I am wrong. Please help me!
*********VFPage*********
<apex:page standardController="Fin_Journal__c" extensions="Fin_LineManager">
        
    <script src="../../soap/ajax/24.0/connection.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getDescription()
        {    
            var queryresult = sforce.connection.query("SELECT Description__c FROM Code_Combination__c WHERE Name = '" + document.getElementById('{!$Component.MyForm:acc}').value + "'", queryresult);            
            var records = queryresult.getArray('records');
            document.getElementById('{!$Component.MyForm:desc}').value = records [0].Description__c;
        }
    </script>
      
    <apex:form id="MyForm">
         <b>
         <table>
             <tr>
                <td><apex:outputLabel >Account&nbsp;Code: </apex:outputLabel></td>
                <td><apex:inputField id="acc" value="{!newline.Code_Combination__c}" style="width:320px" onselect="{getDescription()}"/></td>
             </tr>
             <tr>   
                <td><apex:outputLabel >Description:&nbsp;&nbsp;&nbsp;&nbsp;</apex:outputLabel></td>
                <td><apex:inputField id="desc"  value="{!newline.Description__c}" style="width:320px"/></td>
             </tr>
             <tr>   
                <td></td>
                <td><apex:commandButton action="{!save}" value="Save" /></td>
             </tr>
         </table>
         </b>                         
    </apex:form>
</apex:page>
*********CONTROLLER*********
public class Fin_LineManager
    public Line__c newLine {get; set;}
   
    public Fin_LineManager(ApexPages.standardController stdn)
    {
       newLine  = new Line__c(Journal__c = ApexPages.currentPage().getParameters().get('id'));
    }   
    
    
    public PageReference Save()
    {            
       insert newLine;
       return null ;        
    }    
}
Regards,
Meer Salman

Hi,

 

While accessing an application in salesforce, we have observed a request as 'GET /favicon.ico HTTP/1.1' and the  backend is not able to accept this call and showing as '500 Internal Server Error'.

 

Found that this request is sent by Salesforce to fetch the cloud icon displayed in the each salesforce tab bar. But couldnt get the reason why it is showing an error with in the application backend.

 

Is there any way to resolve this issue?.

 

Can any one please help on this.

 

Thanks in advance.

 

HI..

 

How can I add a Visualforce Page in a PageBlock section for a custom control?

 

Regards,

 

Meer

  • March 09, 2012
  • Like
  • 0