• RohithaSfdc
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
Hi Friends, 
Thanks In advance , Please Help I am Struck over some point of below code,
I need Test coverage for this code please help.
if(leadList.Description!= null)
       {
         acc.Description = leadList.Description;
         if (leadList.Station_Formula__c == null && leadList.Station_from_Web_Form__c !=null )
           acc.Description += ' - ' + 'Station:' + leadList.Station_from_Web_Form__c;

         if (leadList.Station__c != null )
         {   
             System.debug('************** Drone Market' + leadList.Drone_Market__c);
             acc.Description += ' - ' + 'Station:' + leadList.Station_Formula__c;
             if (leadList.Operating_Market__c != null )
             acc.Description +=  ' , ' + 'Operating Market:' + leadList.Operating_Market_Formula__c;
             if (leadList.Drone_Market__c!= null )
             acc.Description +=  ' , ' + 'Drone Market:' + leadList.Drone_Formula__c;
         }
        update acc;
       }  
	   
	    if (leadList.Advertiser_or_Agency__c=='Advertising' && leadList.Agency_Relationship_lkup__c != null )
            System.Debug('**************************** Existing Primary Agency:' + leadList.ConvertedAccountId );
            Agency_Relationship__c agencyBudgetRelationship = new Agency_Relationship__c();
            Opportunity_Agency_Relationship__c oppAgencyRelationShip = new Opportunity_Agency_Relationship__c();
            agencyBudgetRelationship.Account__c = acc.Id;
            agencyBudgetRelationship.Agency_Account__c = leadList.Agency_Relationship_lkup__c ;
            agencyBudgetRelationship.Primary__c = true;
            agencyBudgetRelationship.Type__c='Buying Agency';
            opp.Agency_or_Direct__c = 'Agency';
            oppAgencyRelationShip.Opportunity__c = opp.Id;
            oppAgencyRelationShip.Type__c='Agency of Record';
            oppAgencyRelationShip.Agency_Account__c = leadList.Agency_Relationship_lkup__c ;
            oppAgencyRelationShip.Primary__c = true;
            opp.Type = 'Prospecting';
}
Thanks & Regards
Rohitha
 
Hi Friends, Thanks in advance,

I have Export (Emergency__c) custom object in that (Approval_Status__c) approval status is picklist field with values 'Approved', 'Rejected'.
Approved is green
Rejected is Red
I need to create formula field for this 
Status__c is formula field 
 
IF(ISPICKVAL(Approval_Status__c, 'Approved') , IMAGE("/img/samples/color_green.gif "),
IF(ISPICKVAL(Approval_Status__c, 'Rejected'), IMAGE("/img/samples/color_red.gif ")))

Thanks
Hi Friends, Thanks in advance

I need test class for following method please any body help me reagrding below code.
private static void OppLineItemSchedule(Map < Id, Opportunity > oppList) {
        List < OpportunityLineItem > oppProductLines = [SELECT Station__c, Product_Name__c, Revenue_Category__c, Revenue_Type__c,
            Quantity__c, OpportunityId, Market__c, PricebookEntryId, UnitPrice,
            Amount_Input__c, Start_Date__c, End_Date__c,
            Opportunity.Agency_Commission__c, Opportunity.Synced_Proposal__c
            FROM OpportunityLineItem
            WHERE OpportunityId IN: oppList.values()
        ];

        Map < Id, List < OpportunityLineItem >> mapOppLines = new Map < Id, List < OpportunityLineItem >> ();

        for (OpportunityLineItem oli: oppProductLines) {
            
            if (!String.isBlank(oli.Opportunity.Synced_Proposal__c)) {
                if (mapOppLines.containsKey(oli.Opportunity.Synced_Proposal__c)) {
                    mapOppLines.get(oli.Opportunity.Synced_Proposal__c).add(oli);
                } else {
                    mapOppLines.put(oli.Opportunity.Synced_Proposal__c, new List < OpportunityLineItem > {
                        oli
                    });
                }
            }
        }

        if (mapOppLines.size() > 0) {
            List<OpportunityLineItem> oliToDelete = new List<OpportunityLineItem>();
            for (List<OpportunityLineItem> olis : mapOppLines.values()) 
                oliToDelete.addAll(olis);

        }   
    }

Thanks & regards
RohithaSfdc
Hi friends Thanks in Advance
Need Dropdown Button insted of Y-axis Scroll

Mass Task
/*Visualforce Code*/
<apex:outputLabel value="Related To:" />
	<apex:outputPanel >
		<div id='spanDisplayLabel' style='width:250px; height:30px; overflow-y:scroll;'>
		<apex:dataTable value="{!tableDisplayNames}" var="tableDisplayName" >
		<apex:column value="{!tableDisplayName}"/>
		</apex:dataTable>                    
		</div>
</apex:outputPanel>
/*Controller code*/
public List <String> getTableDisplayNames(){
        List <String> rtnList = new List<String>();
        
        for(String displayName:displayNames.values())
       {
            rtnList.add('-' + displayName);
        }
        return rtnList;
    }
Thanks
Rohitha

 
How to Convert single button as Save & ExportHI Thanks in advance,
How to Convert single button as Save & Export as Excel sheet in local machine , I want Convert Save button as multi actions.

User-added image
This above page allows the user enter text data when user clicks on save button it will save data & export data in Excel sheet. Please help me over this code. i want controller clas for this . please share workable Apex code for this.
 
<apex:page sidebar="false" StandardController="Account" standardstylesheets="false" rendered="true" docType="html-5.0">
  <apex:form > 
            <apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
      <table id="newspaper-b" border="" width="100%">    
          <thead>  
                
             <tr>
                <td>Value1</td>
                <td>Value2</td>      
                <td>Adding Value</td>
            </tr>                    
          </thead>
         <tr>
           <td><apex:inputText style="width:60px;height:20px"/></td>                
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                 
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                   
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>
         </tr>
        </table>
       </apex:pageBlock>
</apex:form>
</apex:page>

I have used both Controller class & Vf page unable to Export the data. Please share the code if you have.

Thanks
 
HI Thanks in advance,

How to Convert single button as Save & Export as Excel sheet in local machine , I want Convert Save button as multi actions.

User-added image
This above page allows the user enter text data when user clicks on save button it will save data & export data in Excel sheet. Please help me over this code. i want controller clas for this . please share workable Apex code for this.
 
<apex:page sidebar="false" StandardController="Account" standardstylesheets="false" rendered="true" docType="html-5.0">
  <apex:form > 
            <apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
      <table id="newspaper-b" border="" width="100%">    
          <thead>  
                
             <tr>
                <td>Value1</td>
                <td>Value2</td>      
                <td>Adding Value</td>
            </tr>                    
          </thead>
         <tr>
           <td><apex:inputText style="width:60px;height:20px"/></td>                
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                 
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                   
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>
         </tr>
        </table>
       </apex:pageBlock>
</apex:form>
</apex:page>

I have used both Controller class & Vf page unable to Export the data. Please share the code if you have.

Thanks
 
HI Thanks in advance,
I am trying to add the fields <apex:inputText> Dynamically
i have got the code in Html (http://jsfiddle.net/YE5vF/2/) But unable to get this code in Visual force page Any body please help me over here. I have used this script even it is not working below is the code i have used. how to use those html components in salesforce VFPAGE.
<apex:page sidebar="false" StandardController="Account" standardstylesheets="false" rendered="true" docType="html-5.0">
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
$("[id$=day]").change(function() {
    var total = 0;     
    $('.timesheet2 input').each(function() {
        total = total + Number( $(this).val() );
    });
    $('div#total_amount').html(total); 
});
});//]]>  

</script>
  <apex:form > 
            <apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
      <table id="newspaper-b" border="" width="100%">    
          <thead>  
                
             <tr>
                <td>Value1</td>
                <td>Value2</td>      
                <td>Adding Value</td>
            </tr>                    
          </thead>
         <tr>
           <td><apex:inputText style="width:60px;height:20px"/></td>                
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                 
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                   
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>
         </tr>
        </table>
       </apex:pageBlock>
</apex:form>
</apex:page>

Need Exact output , How to configure the above mentioned JS fiddle code in Visualforce page

User-added image

Thanks & regards,
Mounika
 
Hi Friends, Thanks in advance

I need test class for following method please any body help me reagrding below code.
private static void OppLineItemSchedule(Map < Id, Opportunity > oppList) {
        List < OpportunityLineItem > oppProductLines = [SELECT Station__c, Product_Name__c, Revenue_Category__c, Revenue_Type__c,
            Quantity__c, OpportunityId, Market__c, PricebookEntryId, UnitPrice,
            Amount_Input__c, Start_Date__c, End_Date__c,
            Opportunity.Agency_Commission__c, Opportunity.Synced_Proposal__c
            FROM OpportunityLineItem
            WHERE OpportunityId IN: oppList.values()
        ];

        Map < Id, List < OpportunityLineItem >> mapOppLines = new Map < Id, List < OpportunityLineItem >> ();

        for (OpportunityLineItem oli: oppProductLines) {
            
            if (!String.isBlank(oli.Opportunity.Synced_Proposal__c)) {
                if (mapOppLines.containsKey(oli.Opportunity.Synced_Proposal__c)) {
                    mapOppLines.get(oli.Opportunity.Synced_Proposal__c).add(oli);
                } else {
                    mapOppLines.put(oli.Opportunity.Synced_Proposal__c, new List < OpportunityLineItem > {
                        oli
                    });
                }
            }
        }

        if (mapOppLines.size() > 0) {
            List<OpportunityLineItem> oliToDelete = new List<OpportunityLineItem>();
            for (List<OpportunityLineItem> olis : mapOppLines.values()) 
                oliToDelete.addAll(olis);

        }   
    }

Thanks & regards
RohithaSfdc
HI Thanks in advance,
I am trying to add the fields <apex:inputText> Dynamically
i have got the code in Html (http://jsfiddle.net/YE5vF/2/) But unable to get this code in Visual force page Any body please help me over here. I have used this script even it is not working below is the code i have used. how to use those html components in salesforce VFPAGE.
<apex:page sidebar="false" StandardController="Account" standardstylesheets="false" rendered="true" docType="html-5.0">
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
$("[id$=day]").change(function() {
    var total = 0;     
    $('.timesheet2 input').each(function() {
        total = total + Number( $(this).val() );
    });
    $('div#total_amount').html(total); 
});
});//]]>  

</script>
  <apex:form > 
            <apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
      <table id="newspaper-b" border="" width="100%">    
          <thead>  
                
             <tr>
                <td>Value1</td>
                <td>Value2</td>      
                <td>Adding Value</td>
            </tr>                    
          </thead>
         <tr>
           <td><apex:inputText style="width:60px;height:20px"/></td>                
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                 
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>                   
          </tr>
          
         <tr>
            <td><apex:inputText style="width:60px;height:20px"/></td>      
            <td><apex:inputText style="width:60px;height:20px"/></td>
            <td><apex:inputText style="width:60px;height:20px"/></td>
         </tr>
        </table>
       </apex:pageBlock>
</apex:form>
</apex:page>

Need Exact output , How to configure the above mentioned JS fiddle code in Visualforce page

User-added image

Thanks & regards,
Mounika