• Sonu Sharma.ax1610
  • 50 Points
  • Member since 2013

  • Chatter
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 11
workflow email template sending blank email to the recipient .
Please can anyone  suggest me the way to get out of this problem

Hi All,


Any one can please explain what is the use/significance of Map(s) in Apex.  And what can do with maps & can not do without maps.


Thanks a ton in advance !






workflow email template sending blank email to the recipient .
Please can anyone  suggest me the way to get out of this problem
Hi Buddies,

Am really afraid that data is not puplating in a formulae field after inserting the record in test classes.
Am doing this,
Opportunity__c copp = new Opportunity__c();
            copp.Owner_of_Opportunity__c=[select id,name from user where name=:Userinfo.getname()].id;
        insert copp;
        System.Debug('Probability is**'+copp.Probability__c+' Amount is**'+copp.Amount__c+' Expected Revenue is **'+copp.Expected_Revenue__c);

USER_DEBUG|[19]|DEBUG|Probability is**10 Amount is**35000 Expected Revenue is **null

Expected Revenue = Amount__c * VALUE(TEXT(Probability__c)) &
Probability is picklist value in my opportunity &
Amount is currency only.

After inserting opportunity, it needs to poulate a value in Expected Revenue. But it was not doing that, am confused. it is showing value in normal records, but it was not showing in test class records.

Please give me the solution.


This is the basic page I''m testing with.  Below is the VF page code.  How do I change the order of all of the related list that appear under the detail section of the on the object?


Thank you, Steve ps I will give Kudos for you if you solve my question

<apex:page standardController="Contact" 
//.fewerMore { display: none;}
<apex:form > 
    <apex:pageMessages /> 
    <apex:detail relatedList="true"></apex:detail>
<apex:pageblock id="CustomList" title="Related Opportunities"  >
    <apex:pageBlockTable value="{!oppz}" var="o" rendered="{!NOT(ISNULL(oppz))}">
             <apex:commandLink action="/{!o.id}" value="{!o.Name}" />
        <apex:column value="{!o.Name}"/>        
        <apex:column value="{!o.Account.Name}"/>        
        <apex:column value="{!o.Type}"/>
        <apex:column value="{!o.Amount}"></apex:column>       
        <apex:column value="{!o.CloseDate}"/>
     <apex:outputLabel value="No records to display" rendered="{!(ISNULL(oppz))}" styleClass="noRowsHeader"></apex:outputLabel>

Here is the apex to go wit

public class sampleDetailPageCon {    
    private List<Opportunity> oppz;    
    private Contact cntact;     
    public sampleDetailPageCon(ApexPages.StandardController controller) {        
        this.cntact= (Contact)controller.getRecord();    
        public List<Opportunity> getOppz()    
            Contact con = [Select id, Account.id FROM Contact where id = :cntact.id];        
            if (con.Account == null)         
                return null;        
                oppz = [Select id, Name, Account.Name, CloseDate, Amount, Type from Opportunity where Account.id = :con.Account.id];        
                return oppz;    


I want to understand batch apex. Can any one explain me what is Batch exactly?


My scenario is i have 440k accounts and 4.5M orders. I am planning to write batch process to track the orders ordered by each account in past 3 years and update the field on accounts. In 2 of the accounts i have more than 10000 orders. When i query the orders i can query upto 50000  rite? I am bit confused with batch process.


Thanks for the help 

The text does not align left it is always aligned center why?

<apex:outputField value="{!doc__c}" style="text-align:left" />

I have tried using a span without luck, any other ideas?

Guys, i'm pretty new to apex and development on Salesforce, I'm trying to build a trigger where it populates the field Fase_Ciclo_vida__c on lead with current the stagename on Opportunity.


Anything i'm missing?



trigger OpportunityAfter on Opportunity (after insert, after update) {
    if (LibCommonFunctions.isTriggerStatusActive()) {
        if (trigger.isUpdate) {
            if (trigger.new.size() == 1) {
                if (trigger.new[0].IsWon) {
                    Opportunity ls = [Select Id, StageName from Opportunity where IsWon=True];
                    if (trigger.new[0].ConvertedOpportunityId != null) {
                        Lead o = [Select Id From Lead Where Id =: trigger.new[0].Id];
                        o.Fase_Ciclo_de_vida__c = ls.Stagename;
                        update o;



Hi i created a trigger which is working.but not working with bulkified(dataloader).please see my code,and let me know to bulkify this code

field in account object (Status_Contact) to be updated when a custom field (Project Status) on the custom Project Object gets updated.



trigger contactlookup on Project__c (after insert,after update) {

list<Project__c> proj=new list<Project__c>();
Map<Id,List<Project__c>> mapProject = New Map<Id,List<Project__c>>();
set<id>ids=new set<id>();
for(Project__c p1:trigger.new)

proj=[SELECT id,contact__r.Client_Status_Contact__c,contact__r.id from Project__c where Contact__c in:ids];

for(Project__c po :proj)

if(po.Contact__c != null)
List<Project__c> ProjectForKey =mapProject.get(po.Contact__c);
if(ProjectForKey == null)
ProjectForKey = new List<Project__c>();
mapProject.put(po.Contact__c, ProjectForKey);

list<contact> cont= new list<contact>();
cont=[select id ,name,Client_Status_Contact__c from contact];
contact c= new contact();
c.Client_Status_Contact__c =proj[0].contact__r.Client_Status_Contact__c;
for(Project__c p:trigger.new)
Update c;

Hi All,


Any one can please explain what is the use/significance of Map(s) in Apex.  And what can do with maps & can not do without maps.


Thanks a ton in advance !






I want to udpate a field on opportunity (Area) . Country is a field on account and related area is mapped in the custom setting (Area Mapping) . How can i use this custom setting to update the field on opportunity



I need to count the TOTAL Record of Account Object using SOQL and display the record count in the Visualforce page, I am already having more than 50,000 records. How can I get the record count and display the total record count in VF Page? Is there is any other way to get the count in Vf page?