• vfexp41
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 10
    Replies
HI,

             i am planning to clone the opportunity line items. in opportunity  i have 1 opportunitylineitem record, when i created new opportunityline item at that case i have to change the old opportunityline item status to close and i have to copy the old record values(price,discount,amount) to newly created  record. how can i achieve it.
  • September 06, 2014
  • Like
  • 0
Hi All,

                I have a two Accounts----that is Account A
                                                                         Account B

         For my Account A have 5 contacts,
         For my Account B have 3 contacts    my goal is i have to merge Account A to Account B in this i have to assign the Account A contacts to Account B, without removing contacts from Account A.. How can i start my work to achieve this functionality ..any suggestions..
public interface ColourInt {
    String getColour();
}
public  class ColourClassBase implements ColourInt{

    public  String getColour(){
        return 'blue';
    }
}

HI,

         Can anyone give me test class for my below trigger, i can't understand how to start the test class for my trigger

     
trigger updatequotestatus on task (after insert, after update){
    set<Id> quoteIds = new set<Id>();
    list<quote__c> quotes = new list<quote__c>();
      for(task t:trigger.new){
   
       if(t.whatId!=null){

        if((t.whatid.getsobjecttype()==quote__c.sobjecttype)){
            quoteIds.add(t.whatId);
        }
      } 
    }
    for(quote__c q:[select StageName__c from quote__c where Id IN : quoteIds]){
        quote__c qt = new quote__c();
        qt.Id = q.Id;
        qt.StageName__c = 'Proposal Sent';
        quotes.add(qt);
    }
    if(quotes.size()>0){
        update quotes;
    }
}

HI,
       i Have a custom object i want to display the pop up window when i select the picklist value, and  when i click on save button  i have to display this pop-up window on standard salesforce page.
  how can i acheive this..??
HI,

         I create the custom Email Button IN Quote Page I have to HIDE/SHOW that Button based upon the Quote-line item field, Quote Field Here Quote and Quote line items both have master-detail relation ship, quote is parent quote line -item is child.User-added image
I am working with visualforce template i am getting all decimal values in my mail but i want to round it in Max upto 2 decimals.How can i achive

 <messaging:emailTemplate recipientType="Contact" relatedToType="Quote__c" subject="Your requested quote #{!relatedTo.Name}" >
      <messaging:htmlEmailBody>
                <apex:outputField value="{!relatedTo.Total_Price__c}"/>
              <apex:outputField value="{!relatedTo.Total_Shipping__c}"/>  
            <apex:outputField value="{!relatedTo.Gtotal__c}"/>
     </messaging:htmlEmailBody>

     </messaging:emailTemplate>

MY OUTPUT IS--->>

     SubTotal  $90.0000
   Shipping & handling     $2.000
 Grand Total(Incl.Tax)  $100.1700
HI,

    In my Visualforce page I have 3 radio buttons and 2 text fields. If I select the first radio button automatically field 1 is shown and field 2 is hidden.

I select radio button 1 & field 1 and save into the database. When I edit the previously saved data, radio button 1 is not selected. How can I make it selected in edit mode? In edit mode only field value is populating the radio button is not populating below image show it
  

       User-added image


    <apex:Page standardcontroller="Opp__c">
         <apex:form >
<apex:pageBlock >
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>

function show(t)
{
if ( t == 0 ){
    $('[id$="defaultcost"]').show();
    $('[id$="differcost"]').hide();
}
else{
$('[id$="defaultcost"]').hide();
$('[id$="differcost"]').show();

  }    
}
</script>
   <apex:pageBlockButtons >
          <apex:commandButton value="Save" action="{!save}"/>
          <apex:commandButton value="Cancel" action="{!cancel}"/>
   </apex:pageBlockButtons>
<apex:pageBlockSection columns="1" title="Shipping Information">
<apex:selectRadio value="{!Opp__c.shipping_type__c}" onChange="show(this.value);">
<apex:selectOption itemLabel="Use Store Settings" itemValue="0" />
<apex:selectOption itemLabel="Per Item" itemValue="1" />
  <apex:selectOption itemLabel="Fixed Price Per Order" itemValue="2"/>
  </apex:selectRadio>
  <apex:inputField value="{!Opp__c.storeprice__c}" id="defaultcost" style="display:block;"/>
   <apex:inputField value="{!Opp__c.price__c}" id="differcost" style="display:none;"/>
  </apex:pageBlockSection>

</apex:pageBlock>
</apex:Page>
I have 3 fields 1) shipping_type__c 2) Total_Shipping__c 3) CheckOut__c

when shipping_type__c = 0 at this condition i want to show CheckOut__c values in visualforce template

when shipping_type__c = 1 And 2 at this condition i want to show Total_Shipping__c fields values in email template

how can i write the if condition in visualforce email template

 <messaging:emailTemplate recipientType="Contact" relatedToType="Quote__c" subject="Your requested quote #{!relatedTo.Name}" >              
             <tr>                                                                   
            <td align="right"  style="width:90%">                                            
                <apex:outputText value="Shipping and handling"/></td>
                <td align="right"  style="width:10%; font-weight:bold">
                <apex:outputField value="{!relatedTo.Total_Shipping__c}"/></td>
            </tr>

            <tr>                                                                   
            <td align="right"  style="width:90%">                                            
                <apex:outputText value="Shipping and handling"/></td>
                <td align="right"  style="width:10%; font-weight:bold">
                <apex:outputField value="{!relatedTo.Total_Shipping__c}"/></td>
            </tr>

      </messaging:emailTemplate>
HI,
      IN my Sandbox i have 2 custom objects and 4 standard objects

  the relation ship

 Account--->>contact-->>opp-->>Quote(custom object)-->>quote-line(custom object)-->>Product

 i am planning to move this to production i want move standard objects also, or only custom objects

 i have the following

 3 WFR on Quote + 1 WFR on Quote-line item
 1 trigger on Quote
 1 V.f page is for Quote
 3 webservices
 1 Visualforce template
 
 here quote is parent and line item is child. Quote having roll-up summaries for line-items
can anyone give mesuggestions in which way i want to move above all, first which i want to move
HI,

          I am displaying the values of Quote in Visualforce page, for my total amount field i have 4 decimals it showing in PDF page
$30.0000, i want to round the value in PDF  how it is possible

    <apex:page standardController="Quote__c" showHeader="false" renderAs="pdf">
<apex:repeat value="{!Quote__c.quote_items__r}" var="line">
          <apex:outputField value="{!line.Unit_Price__c}"/>
             <apex:outputField value="{!line.Total_Price__c}" styleClass="productName"/>
</apex:repeat>
</apex:page>

  how can i round the totalprice,unitprice in visualforce page
HI,

      I am connecting to Quote custom object by using standard controller may i know how can i get inline editing 


   <apex:pageBlock title="Quote Information" mode="edit">
       <apex:pageBlockButtons >
              <apex:commandButton value="Save" action="{!save}"/>
              <apex:commandButton value="Cancel" action="{!cancel}"/>
       </apex:pageBlockButtons>
  <apex:pageBlockSection title="Information" columns="2">
   <apex:inputField value="{!Quote__c.Name}"/>
   <apex:inputField value="{!Quote__c.Opportunity__c}"/>
   <apex:inputField value="{!Quote__c.Contact__c}"/>
   <apex:inputField value="{!Quote__c.Email__c}"/>
   <apex:inputField value="{!Quote__c.Expiration_Date__c}"/>
  </apex:pageBlockSection>
Hi,
  
     I wrote my vf, apex class may i know how to write the test class for bwlow apex class

  
    public class TestMapController2{
   
    public map<string,integer> data {get;set;}
   
    public TestMapController2(){
        data = new map<string,integer>();
       for(Contact acc: [Select Id, Name  from contact])
     {
            integer count = data.get(acc.name);
          
            if(count != null)
                count++;
            else
                count = 1;
            data.put(acc.name, count);
        
          
        }
    }
}
HI,

    In my Visualforce page I have 3 radio buttons and 2 text fields. If I select the first radio button automatically field 1 is shown and field 2 is hidden.

I select radio button 1 & field 1 and save into the database. When I edit the previously saved data, radio button 1 is not selected. How can I make it selected in edit mode? In edit mode only field value is populating the radio button is not populating below image show it
  

       User-added image


    <apex:Page standardcontroller="Opp__c">
         <apex:form >
<apex:pageBlock >
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>

function show(t)
{
if ( t == 0 ){
    $('[id$="defaultcost"]').show();
    $('[id$="differcost"]').hide();
}
else{
$('[id$="defaultcost"]').hide();
$('[id$="differcost"]').show();

  }    
}
</script>
   <apex:pageBlockButtons >
          <apex:commandButton value="Save" action="{!save}"/>
          <apex:commandButton value="Cancel" action="{!cancel}"/>
   </apex:pageBlockButtons>
<apex:pageBlockSection columns="1" title="Shipping Information">
<apex:selectRadio value="{!Opp__c.shipping_type__c}" onChange="show(this.value);">
<apex:selectOption itemLabel="Use Store Settings" itemValue="0" />
<apex:selectOption itemLabel="Per Item" itemValue="1" />
  <apex:selectOption itemLabel="Fixed Price Per Order" itemValue="2"/>
  </apex:selectRadio>
  <apex:inputField value="{!Opp__c.storeprice__c}" id="defaultcost" style="display:block;"/>
   <apex:inputField value="{!Opp__c.price__c}" id="differcost" style="display:none;"/>
  </apex:pageBlockSection>

</apex:pageBlock>
</apex:Page>
HI,

             i am planning to clone the opportunity line items. in opportunity  i have 1 opportunitylineitem record, when i created new opportunityline item at that case i have to change the old opportunityline item status to close and i have to copy the old record values(price,discount,amount) to newly created  record. how can i achieve it.
  • September 06, 2014
  • Like
  • 0
Hi All,

                I have a two Accounts----that is Account A
                                                                         Account B

         For my Account A have 5 contacts,
         For my Account B have 3 contacts    my goal is i have to merge Account A to Account B in this i have to assign the Account A contacts to Account B, without removing contacts from Account A.. How can i start my work to achieve this functionality ..any suggestions..
HI,
       i Have a custom object i want to display the pop up window when i select the picklist value, and  when i click on save button  i have to display this pop-up window on standard salesforce page.
  how can i acheive this..??
I am working with visualforce template i am getting all decimal values in my mail but i want to round it in Max upto 2 decimals.How can i achive

 <messaging:emailTemplate recipientType="Contact" relatedToType="Quote__c" subject="Your requested quote #{!relatedTo.Name}" >
      <messaging:htmlEmailBody>
                <apex:outputField value="{!relatedTo.Total_Price__c}"/>
              <apex:outputField value="{!relatedTo.Total_Shipping__c}"/>  
            <apex:outputField value="{!relatedTo.Gtotal__c}"/>
     </messaging:htmlEmailBody>

     </messaging:emailTemplate>

MY OUTPUT IS--->>

     SubTotal  $90.0000
   Shipping & handling     $2.000
 Grand Total(Incl.Tax)  $100.1700
please any one can guide mee to integration between salesforce to magento?????
HI,
      IN my Sandbox i have 2 custom objects and 4 standard objects

  the relation ship

 Account--->>contact-->>opp-->>Quote(custom object)-->>quote-line(custom object)-->>Product

 i am planning to move this to production i want move standard objects also, or only custom objects

 i have the following

 3 WFR on Quote + 1 WFR on Quote-line item
 1 trigger on Quote
 1 V.f page is for Quote
 3 webservices
 1 Visualforce template
 
 here quote is parent and line item is child. Quote having roll-up summaries for line-items
can anyone give mesuggestions in which way i want to move above all, first which i want to move
HI,

          I am displaying the values of Quote in Visualforce page, for my total amount field i have 4 decimals it showing in PDF page
$30.0000, i want to round the value in PDF  how it is possible

    <apex:page standardController="Quote__c" showHeader="false" renderAs="pdf">
<apex:repeat value="{!Quote__c.quote_items__r}" var="line">
          <apex:outputField value="{!line.Unit_Price__c}"/>
             <apex:outputField value="{!line.Total_Price__c}" styleClass="productName"/>
</apex:repeat>
</apex:page>

  how can i round the totalprice,unitprice in visualforce page