• Nirmal Christopher
  • NEWBIE
  • 215 Points
  • Member since 2013
  • Technology Lead
  • Infosys

  • Chatter
    Feed
  • 4
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 83
    Replies
Hi there

First of all, I am NOT looking to rename "Account" to something else, but can I rename the field "Account" on just one of my standard objects?  

Specifically, on the standard Quote object, the standard "Account" field really represents "Bill-to Party" (as per SAP).  I would like to know if I can rename just this one standard field Account on Quote?  Again, I don't mean to rename "Account" globally.

I went to the Rename Tabs and Labels for Quote and don't even see the field for "Account".  Then I realize, when I go to the Rename page for, say, Opportunities, I don't see "Account" either.

Does it mean I can not rename the "Account" field name without renaming "Account" object name, globally?

Thanks
King
Hi,

I have a requirment:
Parent P(STD obj) – lookup relationship - Child C(Custom obj)
If C has no records then show C  creation link
Else show ‘Send an Email’ link (Link : Go to - Activity related list – Send an Email button )

*Else part working fine.

I am unable to control the visiblity of the child creation link when no child record present.

Thanks,
Sameera
 
Hi All,
I have a requirement that on the click of account save button it has to check whether loginName and Keymanagername(Field on account which has lookup with user) are same or not if yes then assign it to one permission set.
As per my understanding i have Wriiten this in Account Handler Class 
Id userId=UserInfo.getUserId();
String userName=[Select Id, Name From User Where Id =:userId].Name;
system.debug('username'+userName);
and Created a list object on handler class like private List<KeyAccountManager__c> keymanagersFromAccounts = new List<KeyAccountManager__c>();
But i am not sure how can i compare this both because one is string and another is list object.Could any one that what would be the right approach for it.should i need to find all accounts keymanagers in a field and have to put a loop to check its matching with usename or not.I dont have a clear understaning that how to achieve this.
Hi all, i'm a beginner ! 

I'm working on a BI project with Tacton and SalesForce. I need to "move" data (realted to an opportnity X in SalesForce) from Tacton to SalesForce, so i can create with those data a BI Dashboard with a third software called Tableau. 

Any possibility to move data from Tacton to SalesForce ? Thank you ! 
I want a chat button to be displayed on my website that says "Chat with Us" where people can click to initiate a chat on VerifiedFirst.com.
This code is embedded in my footer but no button appears. What am I doing wrong?

<script type='text/javascript' src='https://c.la3-c1-was.salesforceliveagent.com/content/g/js/34.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la3-c1-was.salesforceliveagent.com/chat', '572o0000000L5LT', '00Do0000000XzpL');
</script>

<a id="liveagent_button_online_573o0000000L6Ig" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573o0000000L6Ig')"><!-- Online Chat Content --></a><div id="liveagent_button_offline_573o0000000L6Ig" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('573o0000000L6Ig', document.getElementById('liveagent_button_online_573o0000000L6Ig'));
liveagent.showWhenOffline('573o0000000L6Ig', document.getElementById('liveagent_button_offline_573o0000000L6Ig'));
});</script>
Hi There,

I have a controller which is for an object, that has many children objects looking it up. The controller wraps the two children into a datatble. So far, everything on the page works, if I am inserting these records. I was wondering, what I would have to change within the controller, so that it can be used for editing records as well.

By editing, I essentially mean displaying the page, with all the inpput fields filled and the datatable full of child objects, how it looked just before save. I think i need to access the Fin record and all loan split and loan security records that look the Fin record up.

I am not sure how to phrase this, a point in the right direction would be much appreciated.

this is my controller:
 
public class FinanceNew{
    
    public Finance__c Fin { get; set; }
    public Finance_Loan_Security__c LoanSecurity { get; set; }
    public Finance_Loan_Split__c LoanSplit { get; set; }
    
    
    //Wrapper multi add try to implement
     public List<FinLoanSplitWrapper> wrappers {get; set;}
 public static Integer toDelIdent {get; set;}
 public static Integer addCount {get; set;}
 private Integer nextIdent=0;
 
 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 1
       public List<FinLoanSecurityWrapper> wrappers2 {get; set;}
 public static Integer toDelIdent2 {get; set;}
 public static Integer addCount2 {get; set;}
 private Integer nextIdent2=0;
 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 1
 
 ////////////////test
 
 public decimal AggregateLoanAmount{get;set;}
 public integer LoanSplitSize{get;set;}
 
 public void calculation()
{
AggregateLoanAmount = 0.00;
LoanSplitSize = 0;
  for (FinLoanSplitWrapper wrap : wrappers)
  {
  if(wrap.FinLoanS.Loan_Amount__c == null){
  wrap.FinLoanS.Loan_Amount__c = 0.00;
  }
   LoanSplitSize = LoanSplitSize + 1;
   AggregateLoanAmount = AggregateLoanAmount + wrap.FinLoanS.Loan_Amount__c;
  }
  

}

 

 
 ////////////////test
 
  
 public void delWrapper()
 {
  Integer toDelPos=-1;
  for (Integer idx=0; idx<wrappers.size(); idx++)
  {
   if (wrappers[idx].ident==toDelIdent)
   {
    toDelPos=idx;
   }
  }
   
  if (-1!=toDelPos)
  {
   wrappers.remove(toDelPos);
  }
 }
 
 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 2
  public void delWrapper2()
 {
  Integer toDelPos=-1;
  for (Integer idx=0; idx<wrappers2.size(); idx++)
  {
   if (wrappers2[idx].ident2==toDelIdent2)
   {
    toDelPos=idx;
   }
  }
   
  if (-1!=toDelPos)
  {
   wrappers2.remove(toDelPos);
  }
 }
 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 2
  
 public void addRows()
 {
  for (Integer idx=0; idx<addCount; idx++)
  {
   wrappers.add(new FinLoanSplitWrapper(nextIdent++));
  }
 }

  /* Remove for now, as it has been made redunant. keep for reference incase soemthing goes wrong
 public PageReference save()
 {
  List<Finance_Loan_Split__c> FLS =new List<Finance_Loan_Split__c>();
  for (FinLoanSplitWrapper wrap : wrappers)
  {
   FLS.add(wrap.FinLoanS);
  }
   
  insert FLS;
   
  return new PageReference('/' + Schema.getGlobalDescribe().get('Finance_Loan_Split__c').getDescribe().getKeyPrefix() + '/o');
 }
 */
  
 public class FinLoanSplitWrapper
 {
  public Finance_Loan_Split__c FinLoanS {get; private set;}
  public Integer ident {get; private set;}
   
  public FinLoanSplitWrapper(Integer inIdent)
  {
   ident=inIdent;
   FinLoanS=new Finance_Loan_Split__c(Loan_Split_Number__c=ident);
  }
 }
 
  //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 3
 public void addRows2()
 {
  for (Integer idx=0; idx<addCount2; idx++)
  {
   wrappers2.add(new FinLoanSecurityWrapper(nextIdent2++));
  }
 }
 
 
/* Remove for now, keep for ref
 public PageReference save2()
 {
  List<Finance_Loan_Security__c> LoanSecurity =new List<Finance_Loan_Security__c>();
  for (FinLoanSecurityWrapper wrap : wrappers2)
  {
   LoanSecurity.add(wrap.FinSecS);
  }
   
  insert LoanSecurity;
   
  return new PageReference('/' + Schema.getGlobalDescribe().get('Finance_Loan_Split__c').getDescribe().getKeyPrefix() + '/o');
 }
*/
  
 public class FinLoanSecurityWrapper
 {
  public Finance_Loan_Security__c FinSecS {get; private set;}
  public Integer ident2 {get; private set;}
   
  public FinLoanSecurityWrapper(Integer inIdent)
  {
   ident2=inIdent;
   FinSecS=new Finance_Loan_Security__c(Loan_Security_Number__c=ident2);
  }
 }
  //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Wrapper 2 identical - 3
     //Wrapper multi add try to implement   

    
    
    
    

 public FinanceNew() {
    Fin = new Finance__c ();
    
     Fin.Finance_Office__c = ApexPages.currentPage().getParameters().get('OffId');
     Fin.Account__c = ApexPages.currentPage().getParameters().get('AccId');
    
    LoanSecurity = new Finance_Loan_Security__c ();
      wrappers=new List<FinLoanSplitWrapper>();
  for (Integer idx=0; idx<1; idx++)
  {
   wrappers.add(new FinLoanSplitWrapper(nextIdent++));
  }
      wrappers2=new List<FinLoanSecurityWrapper>();
  for (Integer idx=0; idx<1; idx++)
  {
   wrappers2.add(new FinLoanSecurityWrapper(nextIdent2++));
  }


      
    }
    
    
    public PageReference saveStandard() {
    
    Fin.Aggregate_Borrowings__c = AggregateLoanAmount;
    
    
     try {  
      upsert Fin;
        
        } catch (Exception e) {     
      
             ApexPages.addMessages(e);         
        }
        
 List<Finance_Loan_Split__c> FLS =new List<Finance_Loan_Split__c>();
  for (FinLoanSplitWrapper wrap : wrappers)
  {
   FLS.add(wrap.FinLoanS);
  }

 List<Finance_Loan_Security__c> LoanSecurity =new List<Finance_Loan_Security__c>();
  for (FinLoanSecurityWrapper wrap : wrappers2)
  {
   LoanSecurity.add(wrap.FinSecS);
  }
  
  for (Finance_Loan_Split__c FinLoanSplit: FLS)
  {
    FinLoanSplit.Finance__c = Fin.id;
   FinLoanSplit.Account__c = Fin.Account__c;
   FinLoanSplit.Office__c = Fin.Finance_Office__c;
  }
  
    for (Finance_Loan_Security__c LoanSec: LoanSecurity)
  {
    LoanSec.Finance__c = Fin.id;
   LoanSec.Account__c = Fin.Account__c;
   LoanSec.Office__c = Fin.Finance_Office__c;
  }            
        
        try { 
        
        upsert FLS;
        upsert LoanSecurity;
       
       
        PageReference pageRef= new PageReference('/apex/DestinyAccount?id='+fin.Account__c+'&Sfdc.override=1');
        return pageRef;
        } catch (Exception e) {     
      
             ApexPages.addMessages(e);         
        }
        
        
        
        return null;
    
    }
    
      
    public PageReference Cancel() {
   
        PageReference pageRef= new PageReference('/apex/DestinyAccount?id='+Fin.account__c+'&Sfdc.override=1');
        return pageRef;
     
    }

 
 
    
}

thank you in advance!
HI,

My requirement is to create an activity while Clicking on Submit Button can anyone please help me with code.

Thanks&Regards,
Abhinav.
HI all,
(System.Trigger.isInsert ||
(lead.Email != System.Trigger.oldMap.
get(lead.Id).Email)))
How can I understand this ?here get() is the method in the oldMap or how many methods are there  in oldMap? and where to use get ()put()set()??orelse we can use where ever we want ??

Please help me ..I am Learning Apex classes and Triggers
 
Hi,

how to add custom button in related list in page layout in salesforce, My button is not showing in avilable buttons, Is this somthing related permission issue. 
public class SalesOrder {
  public Order record{get;set;}
    public SalesOrder (ApexPages.standardcontroller std)
     { 
       record = new Order();           
     } 
  public pagereference dosave(){
      record.QuoteId = ApexPages.currentPage().getParameters().get('quoteID');
       insert record;
       ApexPages.AddMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record Created Successfully.Thank you!'));
       pagereference page=new pagereference('/apex/SalesOrder');     
       return page;        
    }     
  public pageReference Cancel(){        
         pagereference page = new pageReference('/apex/QuoteVfPage');
         page.setRedirect(true);
         return page;
     }   
}



here is the test class i have written correct me. i am new to salesforce

@istest
Private class TestSalesOrder{
 Static TestMethod void Dosave(){
  Test.startTest(); 
 PageReference pageRef = Page.SalesOrder;
Test.setCurrentPageReference(pageRef);
  String quoteId;
    if(!test.isrunningtest()) {
      quoteId = ApexPages.currentPage().getParameters().get('quoteID');
      Account a=new Account(Name='test1',Phone='9458383336');
     insert a;
     Order ord=new Order(AccountId=a.id,Name='test',status='draft',EffectiveDate=system.today());
     insert ord;
     }
     else
      {
      }
Test.stopTest();
}
Static TestMethod void Cancel(){
Test.StartTest();
PageReference pageRef = Page.QuoteVfPage;
Test.setCurrentPageReference(pageRef);
}
}
HI, This may seem like an elementary question but I have not seen this explained anywhere in Sales Force docs however I may have overlooked this topic:

Q) Do inactive triggers still get calculated in an organization's overall coverage ?
I was thinkng that since their meta-xml status has changed to "Inactive" , the Apex Test Execution is somehow notified to omit the inactive trigger as part of  the overall coverage thus possibly increasing the organization's overalll code coverage percentage.

Brief Explanation/Reason for my question:
We have to maintain and scrub our list of older triggers and classes which may no longer be  needed  (not sure yet) due to changes in process or due to software upgrades like Non-Profit Starter Pack(which changes the Contact-Account Relationship regarding Contact's Account ID lookup by making this lookup field obsolete since accounts are now regarded as affiliations ).

Thanks much.
Hi All,

How to upload a picture with a record in custom object.
Please help me
Hi,

Is there a way to make the columns in this visualforce page sortable?  It's simply a page that displays the open tasks owned by the current user.

controller:
 
public class tasksController{
    
    List<Task> tk; 
      // toggles the sorting of query from asc<-->desc


    public tasksController(ApexPages.StandardController Controller){
     }  
     
    public List<Task> getResults(){     
        return tk;
    }         
    public PageReference gettk(){
        String userId=UserInfo.getUserId();
        UserId=userId.Substring(0,15);
        tk=[Select Status, Subject, Priority, OwnerId, Owner.Name, WhatId, Response_Needed__c,What.Name, WhoId, Who.Name, ActivityDate from Task WHERE 
             Status != 'Completed' AND (ActivityDate = THIS_WEEK ) AND OwnerId =: UserId ORDER BY ActivityDate DESC LIMIT 25  ];
        return Null; 
    }
}



visualforce page:
 
<apex:page standardController="Task" extensions="tasksController" action="{!gettk}">
<apex:form >
    <html>
    &nbsp;&nbsp;<img src="/img/icon/home32.png"/>
    <font size="5">&nbsp;&nbsp;My Open Tasks Due This Week</font><br></br>

<apex:pageblock >


                    <apex:pageBlockTable value="{!results}" var="tsk">
                                <apex:column >
                                    <apex:outputlink value="/{!tsk.Id}">{!tsk.Subject}</apex:outputLink>
                                    <apex:facet name="header"> Subject </apex:facet>                                                                                                       
                                </apex:column>
                                <apex:column > 
                                    <apex:outputField value="{!tsk.Response_Needed__c}" />
                                    <apex:facet name="header"> Urgency                                      
                                    <span class="helpButton" id="example-title-_help">
                                    <img src="/s.gif" class="helpOrb"/>
                                      <script type="text/javascript">
                                        sfdcPage.setHelp('example-title', 'RED: Task is overdue by 1 day or more or has no due date.  YELLOW: Task is due today.  GREEN: Task is due on some day in the future. ');
                                      </script>
                                    </span>                                                                                                       
                                    </apex:facet>                                                                      
                                </apex:column>                                
                                <apex:column >
                                    <apex:outputLink value="/{!tsk.WhoId}">{!tsk.Who.Name}</apex:outputLink>
                                    <apex:facet name="header"> Name</apex:facet>
                                </apex:column> 
                                <apex:column >
                                    <apex:outputLink value="/{!tsk.OwnerId}">{!tsk.Owner.Name}</apex:outputLink>
                                    <apex:facet name="header"> Assigned To </apex:facet> 
                                </apex:column>
                                <apex:column value="{!tsk.ActivityDate}"/>                                                                                                                                                                                                   
                                <apex:column value="{!tsk.Status}"/>  
                    </apex:pageBlockTable> 
                    
                    
                    <br></br>                 
                    <apex:outputLink target="_blank" value="https://cs15.salesforce.com/00Oe0000000Ta99" id="theLink">View All My Open Tasks</apex:outputLink>

 </apex:pageblock>
                   


    </html>
    </apex:form>
</apex:page>

 
I creating an event in salesforce and sending the activity date and time from the UI.

It saving the same time in sandbox.I moved the same to production is showing a time difference of -7 hrs

My time zone for both production and sandbox is the same i.e:(GMT-07:00) Pacific Daylight Time (America/Los_Angeles)

but when i query the activity date and time it is showing the current time.

But in the UI it is displaying the wrong time.