• SFDC n12
  • NEWBIE
  • 395 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 9
    Likes Received
  • 0
    Likes Given
  • 151
    Questions
  • 210
    Replies
Hi,

I am a email template in my approval process 

Your approval has been requested for the following Account Exception.
 
 
Account Name : 15TH JUDICIAL DISTRICT
 
Program: ADR
 
Type: Exception Adjustment
 
Description : sdsd
 
Total Number of Contracts Moved : 63
 
Total Estimated Amount of Contracts Moved : $75.00
 
Submitted By: BharathKumar Narayanan
 
Approval Status : Pending with Insurance Group Approval
 
Link to the Account Exception : https://cs11.salesforce.com/a1AZ0000002aYIU
 
 
----------------------------------------------------------------------------------------------------------
To approve or reject this item, reply to this email with the word APPROVE, APPROVED, YES, REJECT, REJECTED, or NO
 
Or
 
Log into Salesforce (https://test.salesforce.com) and navigate to the homepage and to the "Items to Approve" section to view the approval record.
 
 
If replying via email you can also add comments on the second line. The comments will be stored with the approval request in Salesforce CRM.
Your approval has been requested for the following Account Exception.
 
 
Account Name : 15TH JUDICIAL DISTRICT
 
Program: ADR
 
Type: Exception Adjustment
 
Description : sdsd
 
Total Number of Contracts Moved : 63
 
Total Estimated Amount of Contracts Moved : $75.00
 
Submitted By: BharathKumar Narayanan
 
Approval Status : Pending with Insurance Group Approval
 
Link to the Account Exception : https://cs11.salesforce.com/a1AZ0000002aYIU
 
 
----------------------------------------------------------------------------------------------------------
To approve or reject this item, reply to this email with the word APPROVE, APPROVED, YES, REJECT, REJECTED, or NO
 
Or
 
Log into Salesforce (https://test.salesforce.com) and navigate to the homepage and to the "Items to Approve" section to view the approval record.
 
 
If replying via email you can also add comments on the second line. The comments will be stored with the approval request in Salesforce CRM.



I am getting the above email template on submitting a record in my outlook

when i try to click on reply for approving the record , i am getting the same user name from which i got the email 

i want it to notify to the next email approver and not to the same from which i got the email 

Help me if i am doing anythin wrong

Thanks in Advance
 
Hi,

I need help on the following requirement,


1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object



1) if the account is a nornmal account (PDN Record type) , the contact(name) associated with that account with title "Dealer Principal" is populated to that field


2) If the account is a group account


the group account might have many child accounts , where it will check the contacts of all th e child accounts with the title "Dealer principal" and update the name correspondingly



so my case should work for both the scenarios

First scenario my trigger is working fine , just need help on second one


MY TRIGGER :

trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal" (This is done)

if the account record type is group account , the child accounts contact's name  is set which is having 
contact title as "Dealer Principal"  and not the group account contact  (need help on it)





My requirement is below 


1) if the account is a normal account (PDN Record type) , the contact(name) associated with that account with title "Dealer Principal" is populated to that field


2) If the account is a group account


the group account might have many child accounts , where it will check the contacts of all th e child accounts with the title "Dealer principal" and update the name correspondingly



so my case should work for both the scenarios

First scenario my trigger is working fine , just need help on second one




My trigger :

trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Help me how to get the child account contacts name for account record type is group account

Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal" (This is done)

if the account record type is group account , the child accounts contact's name  is set which is having 
contact title as "Dealer Principal"  and not the group account contact  (need help on it)


My trigger :

trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Help me how to get the child account contacts name for account record type is group account

Thanks in Advance
Hi,

I am having an approval process with multiple stages of approvers , but req is 

if the approver is rejecting a specific record , i want to notify the user with an email which i have an email alert for it and apart from that i want the default out of box salesforce rejection mail to be sent to the customer


How do i enable it in my approval process in rejection

Help me with it please

Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal" (This is done)

if the account record type is group account , the child accounts contact's name  is set which is having 
contact title as "Dealer Principal"  and not the group account contact  (need help on it)


My trigger :


trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Help me how to get the child account contacts name for account record type is group account

Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal"


if the account record type is group account , the child accounts contact is set which is having 
contact title as "Dealer Principal"



I have written a trigger , which is getting saved , but on asving the record in the system i am getting the following exception,

System.LimitException: Too many SOQL queries: 101

My Trigger :



trigger AF_updateaccountexceptions on AccountExceptions__c(after insert, after update){
    map<id,string> dealercontacts=new map<id,string>();
    set<id> accids=new set<id>();
    
    for(AccountExceptions__c acex:trigger.new){
        accids.add(acex.Account__c);
    }
    
    List<contact> cons=new List<contact>([select accountid,firstname,lastname from contact where title='Dealer Principal' and accountid=:accids]);
    
    for(Contact con:cons){
        string conname=con.firstname+' '+con.lastname;
        dealercontacts.put(con.accountid,conname);
    }
    
    list<AccountExceptions__c> acexlisttoupdate =new list<AccountExceptions__c>();
    
    for(AccountExceptions__c acex:trigger.new){
            AccountExceptions__c accex1=new AccountExceptions__c();
        if(dealercontacts.containskey(acex.Account__c)){
        accex1.id=acex.id;
        accex1.Dealer_Principal_s__c=dealercontacts.get(acex.Account__c);
        acexlisttoupdate.add(accex1);
        }
    }
    
    update acexlisttoupdate;
}


Help me what do i need to change in my trigger

Thanks in Advance
 

Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal"


if the account record type is group account , the child accounts contact is set which is having 
contact title as "Dealer Principal"

Help me with the requirement please

Thanks in Advance

 

Hi,

I need help on the following requirement


1) I am having a text field in account object called as "Dealer Principal"

i want to update that field with the contact first name and contact last name if the contact title ="Dealer Principal" which is assocaited with that account

so i am trying to create a formula field on contact object which is a cross lookup and check if the title is "Dealer principal" then i am calling the account field to update, I need help on that formula


IF
(
 Title ="Dealer Principal",
Account.Dealer_Principal__c = LastName

)

i am getting ' )'  missing


Help me with the formula 

Thanks in Advance

 
Hi,

I am having a followng apex code which is reutrning the following error

"List has more than 1 rows assignment to S object"


VF PAGE :

<apex:page standardController="AccountExceptions__c" extensions="AF_ExecutiveReportController">
    <apex:form >
     <style>
        .headerRow .TableTitle {
            color: #CC0000 !important; 
        }
    </style>
        
        <apex:pageBlock title="Executive Committee Report" >
            <b>  <apex:outputText value="1.Total Exceptions ($50,000 threshold per Region):" style="Color:purple" /></b>
            <apex:pageBlockTable value="{!accexp}" var="item" rendered="{!accexp.Type__c=='Exception Adjustment' || accexp.Type__c=='Business Relationship Adjustment'}">
               <b> <apex:column headerValue="Region" headerClass="TableTitle"/> </b>
               <b> <apex:column  headerValue="TotalExceptions" Value="{!accexp.Total_Amount_of_Current_Exception__c }" headerClass="TableTitle"/> </b>
            </apex:pageBlockTable> 
        </apex:pageBlock>
    </apex:form>
</apex:page>


MY CONTROLLER :


public class AF_ExecutiveReportController {
public AccountExceptions__c accexp{get; set; }



  /**
    ** Constructor
    **/
   public AF_ExecutiveReportController (ApexPages.StandardController controller) {
   
   accexp= [Select Id,Account__c,ADR_Month__c,DOSUser__c,Total_Amount_of_Current_Exception__c FROM AccountExceptions__c WHERE ADR_Month__c!=null  ];
   
   }


}

i want to display alll the values for the field i called in my vf page


Help me what do i need to change in my code

Thanks in Advance
Hi,

I am new to visualforce reports, I have the following requirement of developing a visualforce report for which i need help


Report - Total Exceptions ($50000 Threshold per Region)


This report displays the sum of the Total $ value for the exceptions of type ‘Exception Adjustment’ and ‘Business Relationship Adjustment’ where the ADR month (MM/YYYY) matches the specified ADR month (MM/YYYY)

The report is grouped by RBC. (RBC is derived from the RBC of the RVP approver associated with the exception). The data is sorted by RBC (alphabetical ascending)

The report includes the following columns of data (column name indicated in bold):
Region – RBC + ‘ / ‘ + Last Name of RVP for the RBC

Total Exceptions – Total $ value for all exceptions for the requested ADR month (MM/YYYY)
There is a final summary row with ‘Total RVP Approvals’ and the sum of all the $ values listed for the regions

.  Total Exceptions ($50,000 threshold per Region):

Region                            Total Exceptions

Central / Kolski                      $196K

Northeast / Walters                 $71K

Pacific West Coast / Wrate       $7K

Southeast / Timmerman           $176K

West / Kimmel                        $93K

Total  RVP Approvals               $543K


Help me how to do it please

Thanks in Advance

 
Hi,

I need help to write a validation rule for the following requirement


1) I am having a custom lookup field called as DOSApprover_c in my custom object called as "AccountExceptions__c"

2) There is another custom lookup field with account called as "Account__c" in the same custom object


when i select the account and if the account record type is "Group account" only then the field DOSApprover__c should be set mandatory 


Help me how to achieve this req validation rule


Thanks in Advance

Hi,

 I having a requirement where i need to write a soql query for which i need help


1) I am having 2 picklist fields namely ADR MONTH__c and ADR YEAR_c from a custom object where i have to check the date that i create a new record and enter the value of adr month and adr year should be greater than 13 


if the created date is today 10/2014 , the previous records that got created  can be 9/2013


   List<AccountExceptions__c> lstAccExp = [Select Id,Account__c,ADR_Month__c,ADR_Years__c from AccountExceptions__c where Id =:accId ];


i need to check that condition here , help me how to do this


thanks in advance

 

Hi,

I need help on the following requirement


1) i am having a custom object called as account exceptions__c where there are 2 picklist field called as ADR month__c(01 to 12)  and ADR YEAR__c(2014 to 2020)


2) there is a custom field Account__c lookup to account to this custom object 


when i enter the value for those fields, the number of account exceptions created under a specific account for which the adr month and year should be >13


for eg : if i enter 10/2013 it qualfies and if i enter 9/2013 it doesnt qualify since it is less than 13

also the number of records under this scenario is >3 a multi select picklist should be updated

i have written a trigger but its throwing a error


trigger AF_Approval on AccountExceptions__c (before insert , after insert )
{
    if (trigger.isInsert && trigger.isBefore)
    {
         List<Id> accId = new List<Id>();
         List<String> adrMonth = new List<String>();
    for(AccountExceptions__c spl:trigger.new)
    {
           accId.add(spl.Account__c);
           adrMonth.add(spl.ADR_Month__c);
   
    }

   List<AccountExceptions__c> lstAccExp = [Select Id,Account__c,ADR_Month__c,ADR_Years__c from AccountExceptions__c where Id =:accId ];


       if(lstAccExp.size()>3){
              for(AccountExceptions__c ac: lstAccExp){
              
           Date dt = Date.parse(ac.ADR_Years__c,ac.ADR_Month__c,'01');
           if(dt < System.today().addmonths(-13)){
            myobj.Executive_Committee_Approval__c='Yes';
            myobj.Executive_Approval_Reasons__c='Dealer Annual Limit Exceeded';
}
}

         
         }
         
         else{
         
         myobj.Executive_Committee_Approval__c='No';
         
         }



i am getting this complile error

Error: Compile Error: Variable does not exist: Date at line 65 column 22

 Date dt = Date.parse(ac.ADR_Years__c,ac.ADR_Month__c,'01');

ADR_Years__c,ADR_Month__c are picklist values should i not use a date function for this


Please help me

Thanks in Advance

 
Hi,

I am having a approval process which is having 4 stages of approver

i want to capture the comments enterd by the 3 level of approver alone (not any other apperover) in a custom  field 


I have written the following controller, but its not updating my field ADR COMMENTS__C with the comments


public class ApprProcess {
    public static void ProcessInst(AccountExceptions__c [] o1) {
        for(AccountExceptions__c o2:o1) {
            ProcessInstance [] op = [SELECT Id, (SELECT Id, StepStatus, Comments FROM StepsAndWorkitems)
FROM ProcessInstance];
        

            for (ProcessInstance op1 : op) {
                for (ProcessInstanceStep pis : op1.Steps) {
                    if(op1.Status == 'Approved') {
                        o2.ADR_Comments__c = pis.Comments;
                        
 
                    }
                }
            }
        }  
    } 
}


Help me how to achieve it

Thanks in Advance
 
Hi,

I am having a approval process which is having 4 stages of approver

i want to capture the comments enterd by the 3 level of approver alone (not any other apperover) in a custom  field 

Help me how to achieve it

Thanks in Advance
Hi,

I am having a approval process which is having 4 stages of approver

i want to capture the comments enterd by the 3 level of approver alone (not any other apperover) in a custom  field 

Help me how to achieve it

Thanks in Advance
Hi,

I need help on the following requirement to write a SOQL Query


1) I am having 4 picklist fields as follows

ADR MONTH, ADR MOVE FROM MONTH, ADR YEARS, ADR MOVE FROM YEARS


ADR MONTH and ADR MOVE FROM MONTH represents the month picklist values from 01 to12


ADR YEARS AND ADR MOVE FROM YEARS represents years from 2013 to 2020


My requirement is when i enter the value  for the above picklist fields 


eg: ADR MONTH i select todays month (10/2014) and ADR FROM MONTH i select (9/2013) exactly 13 months then i have another field called as


Executive Approval Reasons  which should be set as "Yes"


if i select ADR MONTH as todays month (10/2014) and ADR FROM MONTH as (8/2013) which is less than 13 months then the picklist field 


Executive Approval Reasons  which should be set as "No"


Help me how to achieve this


Thanks in Advance
Hi,

I need help to combing my 2 trigger to the first one


Not sure how to combine both 


MY FIRST TRIGGER :

trigger AF_Approval on AccountExceptions__c (before insert) {
  
    List<Id> accId = new List<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           accId.add(spl.Account__c);
  
    }
    // Soql Account Team member to get the User ID
      
   List<AccountTeamMember>  RegularDOS = [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  growthDos =  [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Growth DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  RVPUsers =   [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance RVP' AND AccountId =:accId LIMIT 1];
   RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account'];
           
  //Id profileId=userinfo.getProfileId();
   User u = AF_DealerCRM_Utility.getUserInfo();
   
   
   String profileName= u.Profile.Name;

    List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
    for (AccountExceptions__c myobj : trigger.new)
    {
   
       if(myobj.Account__r.RecordTypeId != rtypes.Id) {
        if(profileName=='AF: Sales Specialist' && growthDos.size() > 0){
            myobj.DOSUser__c= growthDos[0].UserId;
        }
       
       else if(profileName=='AF: Sales Specialist' && growthDos==null && RegularDOS.size() > 0)
        {
           myobj.DOSUser__c= RegularDOS[0].UserId ;
        }
       
       
        else if( RegularDOS.size() > 0)
        {
            myobj.DOSUser__c=  RegularDOS[0].UserId ;
           
        }
    
          if(RVPUsers.size() > 0){
         myobj.RVP_Approver__c=  RVPUsers[0].UserId ;
         }
         }
        
        
         if(myobj.Total_Amount_of_Current_Exception__c>20000)
         {
         myobj.Executive_Approval_Reasons__c='Exception Value > $20K';
         }
        
    }

}

My Second Trigger that i want to combine to first trigger :


trigger AF_RVP on AccountExceptions__c (after insert) {
List<Id> rvpId = new List<Id>();
Set<Id> adrId = new Set<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           rvpId.add(spl.DOSUser__c);
           rvpId.add(spl.Account__c);
           adrId.add(spl.Id);
    }
  
   
RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account' limit 1];
User RVPUsers =[SELECT Name, ManagerID, Manager.Name FROM User WHERE Id = :rvpId LIMIT 1];
List<AccountExceptions__c> adrExpList = [Select Id,RVP_Approver__c,Account__c,Account__r.RecordTypeId From AccountExceptions__c Where Id IN :adrId];
 
List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
for (AccountExceptions__c obj : adrExpList)
{
if(obj.Account__r.RecordTypeId == rtypes.Id) {
obj.RVP_Approver__c=  RVPUsers.ManagerID;
}   
}

update adrExpList;
}

help me how to combine both of them please


Hi,

I am having a following requirement for which i have written a trigger which i need help on it


1) I am having a field called as DOS Approver__c which is a lookup to user object

2) I am having another field called as RVP Approver__c which is a look up to user object

3) I am having a custom field called as New Request__c which is a lookup to account  


All these 3 custom fields are present in my custom object called as "Account Exceptions"(Special_Programs_ADR_Exception__c)


My req is when i select a account(New Request__c ) and a DOS Approver__c the RVP Approver__c should be auto populated with the manager of the DOS APPROVER User 

This functionality should be applied only for Group Account record type(Based on the account that i select in my custom object)


MY TRIGGER :


trigger AF_RVP on Special_Programs_ADR_Exception__c (after insert, after update) {
List<Id> rvpId = new List<Id>();
Set<Id> adrId = new Set<Id>();
    for(Special_Programs_ADR_Exception__c spl:trigger.new)
    {
           rvpId.add(spl.DOSUser__c);
           rvpId.add(spl.NewRequest__c);
  adrId.add(spl.Id);
    }
  
   
RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account' limit 1];

User actingUsers =[SELECT Name, ManagerID, Manager.Name, Manager.ManagerID, Manager.Manager.Name FROM User WHERE Id = :rvpId LIMIT 1];

List<Special_Programs_ADR_Exception__c> adrExpList = [Select Id,RVP_Approver__c,NewRequest__c,NewRequest__r.RecordTypeId From Special_Programs_ADR_Exception__c Where Id IN :adrId];
 
List<Special_Programs_ADR_Exception__c> oppts = new List<Special_Programs_ADR_Exception__c>();
for (Special_Programs_ADR_Exception__c obj : adrExpList)
{
if(obj.NewRequest__r.RecordTypeId = rtypes.Id) {
obj.RVP_Approver__c=  actingUsers[0].ManagerID;
}   
}
}

I am getting the following error


Error: Compile Error: Expression must be a list type: SOBJECT:User at line 20 column 23

obj.RVP_Approver__c=  actingUsers[0].ManagerID;


Kindly help me what do i need to change in my trigger

Thanks in Advance
Hi,

I am having a following requirement for which i need help,

1) I am having a text box (comments) and followed by a button in my visualforce page

2) when i enter the value in the comments and click on the button a new case has to be created and the comments that i have entered should be mapped to the case and case subject is to be "Lead override" 



My controller :

public class AF_ScriptController {
  
    public String status {get;set;}
    public Lead_Object__c obj {get; set; }
 
   /**
   ** Constructor
   **/
   public AF_ScriptController (ApexPages.StandardController controller) {
 
      String newId = ApexPages.currentPage().getParameters().get('leadId');
      System.debug ('new Id *** :' + newId);

      if (newId != '') {
         obj = [Select Id,Lead_Override_Comments__c,First_Name__c,Last_Name__c,Dealer_Type__c,Products_Dealership__c,F_I_Manager__c,Contracts_Electronically__c,Dealer_Track_RouteOne__c,What_percent_of_inventory_has_a_selling__c,What_percent_of_your_inventory_has_less__c,What_percent_of_your_inventory_is_newer__c,How_many_front_line_ready_units_do_you_c__c,What_are_your_average_monthly_used_vehic__c,Service_Department_on_site__c,Dealership_Retail__c,Dealership_Permanent_Building__c,Dealership_Payed__c,How_many_years_have_you_been_in_business__c,Leadstatus__c, test__c, salutation__c  from Lead_Object__c where id = :newId limit 1];
        
         if (obj.LeadStatus__c == 'Qualified' ) {
            System.debug ('Qualified *** : ' + status);
            status = System.Label.AF_QualifiedScript;
         }
         else {
            status = System.Label.AF_UnqualifiedScript;
            System.debug ('UnQualified *** :' + status);
         }
        
      }

   }

}



Please help me how to do this

Thanks in Advance

Hi,

I want to redirect to a specific thrd party site through canvas without any intermediate tool like heroku,


Let me know how to do it.


Thanks in Advance
Hi,

I want to redirect to a specific page through canvas without the help of any third party site named "Heroku"



please let me know how to do it.


Thanks in Advance
Hi,

I am having a flow where i want to map my picklist values in the flow to the custom field in a object, it works fine for text fields but for picklist its not working


Please help me how to achieve this functionality


Thanks  in Advance....
Hi,

Is there any possiblity of creating a multi level approval process via visualforce workflow ?



Thanks

Hi,

I am trying to add a visualforce page as a home page component , and display it as a link in my home page , but wen i click on the link on the home page , it tries to open in a new window and displays the following error message,

" Id value 00511000000xQ80 is not valid for the Account standard controller "

Do i need to call this home page component in my VF Page , kindly help me on this issue.

Thanks in Advance
Hi,

Please help me to write the test class for the below class,

/****   Create competitiveinfo records from the corresponding opportunity.
**/

public class AF_OpportunityHandlerController{

   public void createCIRecords(List<Opportunity> oppList)
   {
        Competitive_Info__c ci;
        List<Competitive_Info__c> ciList = new List<Competitive_Info__c>();
        for(Opportunity op: oppList)
        {
            ci = new Competitive_Info__c(Account__c = op.AccountId,Line_Of_Business__c = op.Type,OwnerId = op.ownerId,Competing_Lender__c = op.Competing_Lender__c,Competitions_Rate_Index__c = op.Competing_Rate_Type__c,Competitive_Spread__c = op.Competing_Spread__c,Competitions_Net_Rate__c = op.Competition_Net_Rate__c,Date_Competitive_Info_Obtained__c = op.CloseDate,Loan_Type__c = op.Opportunity_Type__c);
            ciList.add(ci);
        }
       
        if(ciList != null && ciList.size() >0)
        {
            try
            {
                insert ciList;
            }
            catch(system.DMLException e)
            {
                system.debug('DML Exception'+e.getDMLMessage(0));
            }
            finally
            {
                AF_DealerCRM_Utility.IS_CI_CREATED = true; 
            }
        }
   }
 
 
 
 
}

Thanks in advance
Hi friends, 

I have installed the informatica data loader for data load automation and i have also downloaded the secure agent for it, when i am trying to establish the connection between sandbox and prod i am getting server url error ,

I have tried with test.salesforce.com for sandbox and login.salesforce.com for production , also i have tried the url after logging in to respective accounts. 

Please do let me know the appropriate solution for it , I am really struck and unable to proceed further.

Thanks in Advance......
Hi,

I would like to automate my data upload in salesforce without data loader , please let me know if i can use anyother tool for performing the data upload automatically or is there any scripts that i can use to automate the upload of data.


Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal" (This is done)

if the account record type is group account , the child accounts contact's name  is set which is having 
contact title as "Dealer Principal"  and not the group account contact  (need help on it)





My requirement is below 


1) if the account is a normal account (PDN Record type) , the contact(name) associated with that account with title "Dealer Principal" is populated to that field


2) If the account is a group account


the group account might have many child accounts , where it will check the contacts of all th e child accounts with the title "Dealer principal" and update the name correspondingly



so my case should work for both the scenarios

First scenario my trigger is working fine , just need help on second one




My trigger :

trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Help me how to get the child account contacts name for account record type is group account

Thanks in Advance
Hi,

I am having an approval process with multiple stages of approvers , but req is 

if the approver is rejecting a specific record , i want to notify the user with an email which i have an email alert for it and apart from that i want the default out of box salesforce rejection mail to be sent to the customer


How do i enable it in my approval process in rejection

Help me with it please

Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal" (This is done)

if the account record type is group account , the child accounts contact's name  is set which is having 
contact title as "Dealer Principal"  and not the group account contact  (need help on it)


My trigger :


trigger updateaccountexceptions on AccountExceptions__c(after insert) {
    map < id, string > dealercontacts = new map < id, string > ();
    set < id > accids = new set < id > ();

    for (AccountExceptions__c acex: trigger.new) {
        accids.add(acex.account__c);
    }

    List < contact > cons = new List < contact > ([select Id, accountid, firstname, lastname from contact where title = 'Dealer Principal'
        and accountid = : accids
    ]);

    for (Contact con: cons) {
        string conname = con.firstname + ' ' + con.lastname;
        dealercontacts.put(con.accountid, conname);
    }

    list < AccountExceptions__c > acexlisttoupdate = new list < AccountExceptions__c > ();

    for (AccountExceptions__c acex: trigger.new) {
        AccountExceptions__c accex1 = new AccountExceptions__c();
        if (dealercontacts.containskey(acex.account__c)) {
            accex1.id = acex.id;
            accex1.Dealer_Principal_s__c = dealercontacts.get(acex.account__c);
            acexlisttoupdate.add(accex1);
        }
    }

    update acexlisttoupdate;

}


Help me how to get the child account contacts name for account record type is group account

Thanks in Advance
Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal"


if the account record type is group account , the child accounts contact is set which is having 
contact title as "Dealer Principal"



I have written a trigger , which is getting saved , but on asving the record in the system i am getting the following exception,

System.LimitException: Too many SOQL queries: 101

My Trigger :



trigger AF_updateaccountexceptions on AccountExceptions__c(after insert, after update){
    map<id,string> dealercontacts=new map<id,string>();
    set<id> accids=new set<id>();
    
    for(AccountExceptions__c acex:trigger.new){
        accids.add(acex.Account__c);
    }
    
    List<contact> cons=new List<contact>([select accountid,firstname,lastname from contact where title='Dealer Principal' and accountid=:accids]);
    
    for(Contact con:cons){
        string conname=con.firstname+' '+con.lastname;
        dealercontacts.put(con.accountid,conname);
    }
    
    list<AccountExceptions__c> acexlisttoupdate =new list<AccountExceptions__c>();
    
    for(AccountExceptions__c acex:trigger.new){
            AccountExceptions__c accex1=new AccountExceptions__c();
        if(dealercontacts.containskey(acex.Account__c)){
        accex1.id=acex.id;
        accex1.Dealer_Principal_s__c=dealercontacts.get(acex.Account__c);
        acexlisttoupdate.add(accex1);
        }
    }
    
    update acexlisttoupdate;
}


Help me what do i need to change in my trigger

Thanks in Advance
 

Hi,

I need help on the following req

1) I am having a custom field called as "Dealer Principal__c" in my custom object called as "Account Exceptions__c"

2) There is a lookup on my custom object called as Account__c which is a lookup to the account object


My req is i want to populate my custom field  "Dealer Principal__c"  on Account exception__c custom object with  the contact first name and last name of the contact  related to the account that i select if the contact title is set as "Dealer Principal"


if the account record type is group account , the child accounts contact is set which is having 
contact title as "Dealer Principal"

Help me with the requirement please

Thanks in Advance

 

Hi,

I need help on the following requirement


1) I am having a text field in account object called as "Dealer Principal"

i want to update that field with the contact first name and contact last name if the contact title ="Dealer Principal" which is assocaited with that account

so i am trying to create a formula field on contact object which is a cross lookup and check if the title is "Dealer principal" then i am calling the account field to update, I need help on that formula


IF
(
 Title ="Dealer Principal",
Account.Dealer_Principal__c = LastName

)

i am getting ' )'  missing


Help me with the formula 

Thanks in Advance