• Balakrishna Rao
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 3
i have few things to ask
1) is there way in apex to generate all custom field in apex for a particular object.
2) In dynamic apex is there a way to check the field is standard field or custom field
Hi All, We are using Jquery datatable to display  the response from webservice callout,. after sorting the table and clicking a new tab in same page and if we going back to the datatable section, it is showing the default sorted columns but not the User sorted columns . we want to show the user sorted columsn whenver user goes back to datatable section
Hi Team,

I have used  many radio buttons in UI and the radio buttons having a structure like parent and child radio button. On clicking a parent button In UI child button will be rendered.  when the user changes the parent button in UI the clicked values in child button should be unchecked automatically.

Suggest me ideas to uncheck the apex:selectradio button on onchange function in parent radiobutton 
I am practicing on trailhead via using my developer org. The chalenging asked me to Create a Guest Administrator and deactivate it. I am currenly the System Administrator of my developer org. We have only one license for System Administrator. How should we solve this issue in order to:
Create a new user using the System Administrator profile and then deactivate that user to preserve the licenses in your org.The new user must use the System Administrator Profile.
The username for the new user must include 'guestadmin' somewhere in it.
The new user must be inactive.
I need some hints or advices. Thanks.
I have <apex:selectRadio> tag in my VisualForce page with  two radio buttons in it. 
I need to pass the value of the selected radio button to a JavaScript function to carry out further functionality.
Here is what I am trying to do:

// partial code from Controller

public List<SelectOption> getStateCountry() {
        List<SelectOption> nameCode= new List<SelectOption>(); 
        nameCode.add(new SelectOption('state','state')); 
        nameCode.add(new SelectOption('Country','Country')); 
        return nameCode; 

 public String getNameCodeValue() {
        return nameCodeValue;
    public void setNameCodeValue(String nameCodeValue) { this.nameCodeValue = nameCodeValue; }

// partial code from VisualForce page
  function testFunction(radval) 
      alert('in Testfunction  : '+ radval);

      <apex:form >
                 <apex:selectRadio id="nameCodeID" value="{!nameCodeValue}" onchange="testFunction('{!nameCodeValue}')" >
                <apex:selectOptions value="{!nameCode}"/>
   </apex:form >


  Alert says:  "in Testfunction  : undefined"

  Am I going in the right direction, please help.


Hi all,


We are generating quotes from Salesforce using Visualforce and rendering the page as PDF.


We are trying to display discounts only on line items that have a discount using the following code:



<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line"> <tr> <td>{!line.PricebookEntry.Product2.ProductCode}</td> <td align="right"><apex:OutputText value="{!ROUND(line.Quantity,0)}"/></td> <td>&nbsp;{!line.Description}</td> <td align="right"><apex:OutputField value="{!line.UnitPrice}"/></td> <td align="right"><apex:OutputField value="{!line.TotalPrice}"/></td> </tr> <apex:outputPanel id="Discounts" rendered="{!IF(AND(ISPICKVAL(Opportunity.Transport_Charges__c, "Producto Level"), line.Discount__c > 0.0), true, false)}"> <tr> <td align="right" colspan="5">Descuento <apex:OutputField value="{!line.Discount__c}"/></td> </tr> </apex:outputPanel> </apex:repeat>


 However this is not working properly. I will explain the 2 problems we are facing:


  1. Rendered condition - The below formula does not work properly. Even though Transport_Charges__c is a PICKLIST fiel, Visualforce throws up an error when saying it is a text field. If we try to change the expression to Opportunity.Transport_Charges__c == "Product Level" it does not work. Any ideas why?
    IF(AND(ISPICKVAL(Opportunity.Transport_Charges__c, "Producto Level"), line.Discount__c > 0.0), true, false)
  2. Conditional line not displaying correctly - For test purposes, until we solve point 1 above, we have used a condition that always evaluates to true. Now we can see the line speciying the discount level, but the line does not print with the same length as the other lines (see image below). This does not seem to make any sense. Any help much appreciated.
Error Screen Shot