• Ramesh Varatharaj
  • NEWBIE
  • 14 Points
  • Member since 2013
  • Manager, Sales Support
  • 24/7 Inc

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 23
    Replies
I am trying deployment from VS Code project using Deploy to source org and it fails with below error. 
I tried reinstalling CLI, creating new project and also with new dev org - nothing seems to help. Could you please suggest how i can overcome this error. 

MissingMessageError: Missing message mdapi_deploy:mdDeployCommandCliCheckOnly for locale en_US.
    at Messages.getMessageWithMap (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:277:19)
    at Messages.getMessage (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:261:21)
    at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:38:36)
    at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
    at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
    at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:111:21)
    at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:125:21)
    at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:58:72)

 
We have opportunity record types based on products selected and the page layout changes by record types. On product update, i am using Process builder + flow to check the related products and update the matching record type. Classic used to update the record type and load the record page with record type matched layout. Lightning does not load automatically and users have to manually refresh the page to see the revised page layout. Is there a way to enfore full page refresh when the record type is updated through flow?

Team, need guidance. We currently have a requirement to allow opportunity creation only from contact related list. By doing so, we are setting lead source and another custom field to map with contact record values. In classic, we were using URL hacks. As the URL hacking does not work in LUX, i am temporarily using below options. Are there any better option?
1) Action button in contact page (not to our liking as we are used to related list buttons, and lead source is a picklist that cannot be mapped directly to related contact's picklist value. So i am using process builder to udpate post the create event)

2) Custom VF button on opportunity with a custom extension class which sets the predefined values as required. SInce the LUX support VF button, this supports our need (but we would prefer a standard page than VF page where ever possible)

Thanks,Ramesh

Team, need a help. I have change owner link in VF page that i am using in LUX as is. The link does not work in LUX - it open another tab with error page does not available in LUX. Please suggest how we can overcome this. 
It looks like this behaviour is only with change owner link, i have another link for changing record type and that works fine without any issues. 

<apex:outputText label="Owner" escape="False" value="{!Object.Owner.Name} [{!LINKTO('Change]' ,'/' + LEFT(Object.id,15) + '/a?retURL=' + URLFOR('/apex/' + $CurrentPage.Name, null, ['id'=Object.id])) }" />

Thanks, Ramesh

Hi Team, Need your guidance on troubleshooting. I wrote a process builder rule to update all related contact and lead, when a lookup user field on account is updated. I am getting the CPU time limite exceeded error for one account which has close to 1800 related records. I went through the debug logs - the CPU limits stays at 0 till it enters managed package, but spikes suddenly after entering managed package. The managed package is from Marketo (trigger - mkto_si.RemoveInterestingMomentLinebreaksContact) and they are saying that this is something to do with codes in my org. Any one experienced this? I have attached the debug log for reference....User-added image
I am writing an controller and VF component to email opportunitylineitemschedule details as an attachment. I am able to include schedule details to the attachment, but i am not able to include the opportunitylineitem's field in the same table. 

My requirement - for each line item schedule row, i would like to have one column populating the opportunitylineitem.Product_Name__c values. I am getting unknown property error 'String.Product_Name__c' if i try to add this field. 
my controller: 
public class emailtemplatev2{
    public emailtemplatev2() {    
    }
  List<OpportunityLineItemSchedule> revenue = new List<OpportunityLineItemSchedule>(); 
   public Id opportunityId {get;set;} 
   public List<OpportunityLineItemSchedule> getrevenue()
   { 
       revenue=[Select OpportunityLineItemId, CurrencyIsoCode, ScheduleDate,Revenue                           
                 from OpportunityLineItemSchedule where OpportunityLineItemId IN (Select ID from OpportunityLineItem 
                 where OpportunityId =:opportunityid )  ];
     return revenue;
        }  
}


VF Component: 
<apex:component controller="emailtemplatev2" access="global">
    
   
    <apex:attribute name="AcctId" type="Id" description="Id of the account" assignTo="{!opportunityId}"/>
    <table border = "2" cellspacing = "0" >
        <tr>
            <td>Product</td>
            <td>Forecast Period</td>
            <td>Currency</td>   
            <td>Amount</td> 
                         
        </tr>
        <apex:repeat value="{!revenue}" var="o">
        <tr>
            <td>{!o.OpportunityLineItemId.Product_Name__c}</td> //having issue in this line
            <td>   
            <apex:outputText value="{0,date,MMM, yyyy}">
            <apex:param value="{!o.ScheduleDate}" /> 
            </apex:outputText>
            </td>  
        
            <td>{!o.CurrencyIsoCode}</td>  
            <td>{!o.Revenue}</td> 
                        
        </tr>
        </apex:repeat>        
    </table>
</apex:component>


 
Hello Experts, need assistance to trace the issue. I am using the below code to map lead records to account - recently i am noticing System.LimitException thrown for this code. I am not able to trace the inefficiency - any clue is appreciated. Thanks

trigger addAccountv1 on Lead (before Insert,before Update){

//sting list to hold leads company name and domain details...
List<string> companies=new list<string>();
List<String> domains =new List<String>();
//list to hold all leads invoking trigger....
List<Lead> leadstomapaccount = new List<Lead>();

For (lead l:trigger.new)
{
  companies.add(l.company);
  domains.add(l.DomainGeo__c);
  leadstomapaccount.add(l);
 }

//querry account where company name of domain matached the lead record and update the list
List<Account> leadAccountIds=[Select Id, OwnerId,Domainv1__c, Name FROM Account WHERE Name IN: companies OR Domainv1__c IN:domains ];


Map<String, Id> acctNameId=new Map<String, Id>();
Map<String, Id> acctDomain=new Map<String, Id>();

//create a map of account id and name. same for account id and domain

For (Account a:leadAccountIds){
  acctNameId.put(a.name,a.Id);
  acctDomain.put(a.Domainv1__c,a.Id);
}



if(Trigger.isInsert) {
For (Lead l2:leadstomapaccount ){ 
  if(acctDomain.containsKey(l2.DomainGeo__c)){  
    l2.Account__c=acctDomain.get(l2.DomainGeo__c);   
  }
    if(acctDomain.containsKey(l2.DomainGeo__c) == false && acctNameId.containsKey(l2.company) ){
    l2.Account__c=acctNameId.get(l2.company);
 }
 
 
}
}

else {

For (Lead l2:leadstomapaccount  ){
   if(l2.Account__c == null){ 
  if(acctDomain.containsKey(l2.DomainGeo__c)) {
    l2.Account__c=acctDomain.get(l2.DomainGeo__c);   
  }
  
  if(acctDomain.containsKey(l2.DomainGeo__c) == false && acctNameId.containsKey(l2.company) ){
    l2.Account__c=acctNameId.get(l2.company);
 }
   }
 
 }
}
}
Hi Team, I have written a code to reset the schedule date whenever the opportunityproductlineitem's service date gets updated. I am coming across an issues - assume opportuntiy has 5 productlineitem and when i edit the servicedate from "editall" page, the system triggers the scheduledate updates only for the last productlineitem's realted schedules - ie the last item in the product. But the updated servicedate gets saved for all the product line item, but the trigger to update the lineitem's schedule is getting triggered only for the last product. But when i go and just click "Edit" and "Save" for other products individually, the schedule gets updated. 

Any idea why this is happening? Thanks 
Hello experts, I need your help on a trigger. I have a requirement to calcualte the annual contract value for opportunities, this should be at both product level and at opportunity level. To be exact, i need to sum the first 12 months Revenue from productlineitemschedule at each productlineitem and then a total one at opportunity level. Could you please help with a sample code which could manage bulk record updates please. 
I have a trigger to rollup the open tasks at lead and contact level. The trigger occasionally throws exception - caused by: System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop
Please suggest how to fix this issue

trigger CalculateOpenTasks on Task (after delete, after insert, after undelete, 
after update) {
// Declare the variables
public set<Id> LeadIDs = new Set<Id>();
public list<Lead> LeadsToUpdate = new List<Lead>();
public set<Id> ContactIDs = new Set<Id>();
public list<Contact> ContactsToUpdate = new List<Contact>();

// Build the list of Leads and Contacts to update
if(Trigger.isInsert || Trigger.isUnDelete || Trigger.isUpdate){
    for(Task t: Trigger.new){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.IsClosed==False && t.Marketing__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.IsClosed==False &&  t.Marketing__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

if(Trigger.isDelete || Trigger.isUpdate){
    for(Task t: Trigger.old){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.IsClosed==False &&  t.Marketing__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.IsClosed==False &&  t.Marketing__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

// Update the Leads

if(LeadIDs.size()>0){
for(Lead l: [Select l.Id, l.Open_Tasks__c,
(Select Id From Tasks where IsClosed = False AND Marketing__c=True)
From Lead l where Id in :LeadIDs])
LeadsToUpdate.add(new Lead(Id=l.Id, Open_Tasks__c = l.Tasks.size()));
update LeadsToUpdate;
}

// Update the Contacts

if(ContactIDs.size()>0){
for(Contact c: [Select c.Id, c.Open_Tasks__c,
(Select Id From Tasks where IsClosed = False AND Marketing__c=True )
From Contact c where Id in :ContactIDs])
ContactsToUpdate.add(new Contact(Id=c.Id, Open_Tasks__c = c.Tasks.size()));
update ContactsToUpdate;
}

}
I am writting a code to copy the company name and title from lead or contacts to the task/activity object - i am doing this so that i can include them in the activity tab for users quick reference. I think i almost completed - but stuck with too many SOQL queries:101 error while testing for records inserts more than 50. Can any please suggest how to fix this:
Here is my code:


trigger copynametitle on Task (before insert) {
// trigger to copy company and title of the contact or lead related to the task

public set<Id> LeadIDs = new Set<Id>();
public set<Id> ContactIDs = new Set<Id>();




    for(task t: trigger.new){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q'))
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003'))
            ContactIDs.add(t.WhoId);
        }
    List<Lead>leaddetail = [Select Id, Name, Company, Title from Lead where ID in :LeadIDs];
    List<Contact>Contactdetail = [Select Id, Name, Title, AccountName_Text__c from Contact where ID in :ContactIDs];
    
    Map<Id, Lead> LeadMap = new Map<Id,Lead>(); 
    Map<Id, Contact> ContactMap = new Map<Id,Contact>(); 
    
    for(Lead l:leaddetail){
    LeadMap.put(l.Id, l);    
    }
    
    for(Contact c:Contactdetail){
    ContactMap.put(c.Id, c);
    }
    
    for(task t1:trigger.new){
    String wld = t.WhoId;
    
    if(wld!=null && wld.startswith('00Q'))
    {
    Lead thisLead = LeadMap.get(t.WhoID);
    if(thisLead!=null)
    {
    t1.Company__c = thisLead.Company;
    t1.Title__c = thisLead.Title;
    }  } 
     
    if(wld!=null && wld.startswith('003'))
    {
    Contact thisContact = ContactMap.get(t.WhoID);
    if(thisContact!=null)
    {
    t1.Company__c = thisContact.AccountName_Text__c;
    t1.Title__c = thisContact.Title;
    }  }  

    }

}}
Please suggest me on how to bulkify this code- i get too many soql errors frequently. 
trigger NewUpdateMonthValueOpp1 on Opportunity (before update) {
Integer FiscalYearStartMonth = [select FiscalYearStartMonth from Organization where id=:Userinfo.getOrganizationId()].FiscalYearStartMonth;
   Double Amount4=0;
   Double Amount6=0;
   Double Amount7=0;
   Double Amount8=0; 
   
for(Opportunity  op:Trigger.New)
{
 List<Revenue_Schedule__c> revenueList = new List<Revenue_Schedule__c>();
                     revenueList =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = THIS_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
 
 List<Revenue_Schedule__c> revenueListFY = new List<Revenue_Schedule__c>();
                     revenueListFY =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = NEXT_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
     
List<Revenue_Schedule__c> revenueListFULL = new List<Revenue_Schedule__c>();
                     revenueListFULL =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Opportunity_Name__c=:op.id ];                                   
 
  for(Integer k=0;k<revenueList.size();k++)
  {
  if(revenueList[k].Total_Value_by_Forecast__c!=null)
    {
    Amount4=Amount4+revenueList[k].Total_Value_by_Forecast__c;
    }
  }
  
    for(Integer l=0;l<revenueListFULL.size();l++)
  {
  if(revenueListFULL[l].Total_Value_by_Forecast__c!=null)
    {
    Amount7=Amount7+revenueListFULL[l].Total_Value_by_Forecast__c;
    }
    Amount8=Amount7+op.Setup_Fee__c;

  }

  for(Integer m=0;m<revenueListFY .size();m++)
  {
  if(revenueListFY [m].Total_Value_by_Forecast__c!=null)
    {
    Amount6=Amount6+revenueListFY [m].Total_Value_by_Forecast__c;
    }
  }                      
  
 op.Current_Year_Fee_Value1__c=Amount4;
 op.Next_FY_Fee_Value__c=Amount6;
  op.Amount=Amount8;
}
}
I need to extend my mass edit functionality to include some fields from child records  - i have a child object to opportunities called forecast and each opportunity can have only one forecast record. So in the mass edit function from the opportunity list view, i would like to include a field from the forecast. The expected end result - i should be able to edit the opportunities selected from the opportunity list view and edit page should include the one field from its child object "forecast". So SAVE would update both the opportunity and its child record.

Can you please guide me on how to customize the mass edit funciton to incorporate this change?

i need help on test class for the below class (i took it from the internet and modified to fit my requirement). I am not from development backgroup, so yours help is much appreciated.

 

public class RSInsert{
Apexpages.StandardController controller;
public RSInsert(Apexpages.StandardController c){ 
    controller = c;
    }
public PageReference save() { 
controller.save();
 PageReference onn = new PageReference('https://cs30.salesforce.com/apex/FTESampleEdit?id='+controller.getId());
    Onn.setRedirect(true);    
    return onn;     //return Apexpages.currentPage(); 
    }
}

We have opportunity record types based on products selected and the page layout changes by record types. On product update, i am using Process builder + flow to check the related products and update the matching record type. Classic used to update the record type and load the record page with record type matched layout. Lightning does not load automatically and users have to manually refresh the page to see the revised page layout. Is there a way to enfore full page refresh when the record type is updated through flow?
Hi All,

I am getting the error message "We couldn't relate your event to this record. Please try again. Confirm to retry." when i try to attach the email through lightning for outlook. Can anybody help me on this? how can rectify this?

Team, need a help. I have change owner link in VF page that i am using in LUX as is. The link does not work in LUX - it open another tab with error page does not available in LUX. Please suggest how we can overcome this. 
It looks like this behaviour is only with change owner link, i have another link for changing record type and that works fine without any issues. 

<apex:outputText label="Owner" escape="False" value="{!Object.Owner.Name} [{!LINKTO('Change]' ,'/' + LEFT(Object.id,15) + '/a?retURL=' + URLFOR('/apex/' + $CurrentPage.Name, null, ['id'=Object.id])) }" />

Thanks, Ramesh

I'm trying to build [Change] link next to record owner name on the lead VF page so that the user can re-assign the leads. My lead VF page is a completely custom build page. I'm expecting this functionality to work as in Standard page ie., when the user clicks the [Change] link he/she should be taken to the change ownership page from where he/she should re-assign the lead and the retUrl should take him/her back to the custom page.

I have used the below piece of code found in this forum - 
<apex:outputLink value="{!URLFOR($Action.Lead.ChangeOwner,Lead.id)}">[Change]</apex:outputLink>

But it's not working as expected. When I add this code and tested by clicking the output link [Change] it asks me to log in again and gives me an error as - 
Stale Session Exception
The page you submitted was invalid for your session. Please try your action again. 

Can I get some help here? 
I am writing an controller and VF component to email opportunitylineitemschedule details as an attachment. I am able to include schedule details to the attachment, but i am not able to include the opportunitylineitem's field in the same table. 

My requirement - for each line item schedule row, i would like to have one column populating the opportunitylineitem.Product_Name__c values. I am getting unknown property error 'String.Product_Name__c' if i try to add this field. 
my controller: 
public class emailtemplatev2{
    public emailtemplatev2() {    
    }
  List<OpportunityLineItemSchedule> revenue = new List<OpportunityLineItemSchedule>(); 
   public Id opportunityId {get;set;} 
   public List<OpportunityLineItemSchedule> getrevenue()
   { 
       revenue=[Select OpportunityLineItemId, CurrencyIsoCode, ScheduleDate,Revenue                           
                 from OpportunityLineItemSchedule where OpportunityLineItemId IN (Select ID from OpportunityLineItem 
                 where OpportunityId =:opportunityid )  ];
     return revenue;
        }  
}


VF Component: 
<apex:component controller="emailtemplatev2" access="global">
    
   
    <apex:attribute name="AcctId" type="Id" description="Id of the account" assignTo="{!opportunityId}"/>
    <table border = "2" cellspacing = "0" >
        <tr>
            <td>Product</td>
            <td>Forecast Period</td>
            <td>Currency</td>   
            <td>Amount</td> 
                         
        </tr>
        <apex:repeat value="{!revenue}" var="o">
        <tr>
            <td>{!o.OpportunityLineItemId.Product_Name__c}</td> //having issue in this line
            <td>   
            <apex:outputText value="{0,date,MMM, yyyy}">
            <apex:param value="{!o.ScheduleDate}" /> 
            </apex:outputText>
            </td>  
        
            <td>{!o.CurrencyIsoCode}</td>  
            <td>{!o.Revenue}</td> 
                        
        </tr>
        </apex:repeat>        
    </table>
</apex:component>


 
Hello Experts, need assistance to trace the issue. I am using the below code to map lead records to account - recently i am noticing System.LimitException thrown for this code. I am not able to trace the inefficiency - any clue is appreciated. Thanks

trigger addAccountv1 on Lead (before Insert,before Update){

//sting list to hold leads company name and domain details...
List<string> companies=new list<string>();
List<String> domains =new List<String>();
//list to hold all leads invoking trigger....
List<Lead> leadstomapaccount = new List<Lead>();

For (lead l:trigger.new)
{
  companies.add(l.company);
  domains.add(l.DomainGeo__c);
  leadstomapaccount.add(l);
 }

//querry account where company name of domain matached the lead record and update the list
List<Account> leadAccountIds=[Select Id, OwnerId,Domainv1__c, Name FROM Account WHERE Name IN: companies OR Domainv1__c IN:domains ];


Map<String, Id> acctNameId=new Map<String, Id>();
Map<String, Id> acctDomain=new Map<String, Id>();

//create a map of account id and name. same for account id and domain

For (Account a:leadAccountIds){
  acctNameId.put(a.name,a.Id);
  acctDomain.put(a.Domainv1__c,a.Id);
}



if(Trigger.isInsert) {
For (Lead l2:leadstomapaccount ){ 
  if(acctDomain.containsKey(l2.DomainGeo__c)){  
    l2.Account__c=acctDomain.get(l2.DomainGeo__c);   
  }
    if(acctDomain.containsKey(l2.DomainGeo__c) == false && acctNameId.containsKey(l2.company) ){
    l2.Account__c=acctNameId.get(l2.company);
 }
 
 
}
}

else {

For (Lead l2:leadstomapaccount  ){
   if(l2.Account__c == null){ 
  if(acctDomain.containsKey(l2.DomainGeo__c)) {
    l2.Account__c=acctDomain.get(l2.DomainGeo__c);   
  }
  
  if(acctDomain.containsKey(l2.DomainGeo__c) == false && acctNameId.containsKey(l2.company) ){
    l2.Account__c=acctNameId.get(l2.company);
 }
   }
 
 }
}
}
Hi Team, I have written a code to reset the schedule date whenever the opportunityproductlineitem's service date gets updated. I am coming across an issues - assume opportuntiy has 5 productlineitem and when i edit the servicedate from "editall" page, the system triggers the scheduledate updates only for the last productlineitem's realted schedules - ie the last item in the product. But the updated servicedate gets saved for all the product line item, but the trigger to update the lineitem's schedule is getting triggered only for the last product. But when i go and just click "Edit" and "Save" for other products individually, the schedule gets updated. 

Any idea why this is happening? Thanks 
Hello experts, I need your help on a trigger. I have a requirement to calcualte the annual contract value for opportunities, this should be at both product level and at opportunity level. To be exact, i need to sum the first 12 months Revenue from productlineitemschedule at each productlineitem and then a total one at opportunity level. Could you please help with a sample code which could manage bulk record updates please. 
we are syncing over leads from marketo to salesforce, and I am getting the following error:

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: mkto_si.RemoveInterestingMomentLinebreaksContact: System.LimitException: Apex CPU time limit exceeded 

I looked at the installed package, but the Apex  coded is "Managed" so I unable to see it.

Anyone know how to bypass or fix it?
Hello, 

Over the past month my Salesforce org has been having Marketo/Saleforce duplicate lead sync problem. For certian leads at random times an action/trigger is duplicating leads as many as 15 times that getting synced over from Marketo. I was able to monitor the action that was setting off the duplicates (Screen shot below).  Has anyone ever had this problem before? If so, how can I stop this from happening? 

What is really strange ....is Salesforce seems to be reading the leads as web to lead. 


Please see action in the screenshot below:

User-added image
Hi, I am having issue using developer console - once i run the test, i am not able to see the detailed results in the developer console. When i click on the test class to see what all codes covered by line, it throws error - Failed to load data log from salesforce....can  you please helperror message
Please suggest me on how to bulkify this code- i get too many soql errors frequently. 
trigger NewUpdateMonthValueOpp1 on Opportunity (before update) {
Integer FiscalYearStartMonth = [select FiscalYearStartMonth from Organization where id=:Userinfo.getOrganizationId()].FiscalYearStartMonth;
   Double Amount4=0;
   Double Amount6=0;
   Double Amount7=0;
   Double Amount8=0; 
   
for(Opportunity  op:Trigger.New)
{
 List<Revenue_Schedule__c> revenueList = new List<Revenue_Schedule__c>();
                     revenueList =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = THIS_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
 
 List<Revenue_Schedule__c> revenueListFY = new List<Revenue_Schedule__c>();
                     revenueListFY =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = NEXT_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
     
List<Revenue_Schedule__c> revenueListFULL = new List<Revenue_Schedule__c>();
                     revenueListFULL =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Opportunity_Name__c=:op.id ];                                   
 
  for(Integer k=0;k<revenueList.size();k++)
  {
  if(revenueList[k].Total_Value_by_Forecast__c!=null)
    {
    Amount4=Amount4+revenueList[k].Total_Value_by_Forecast__c;
    }
  }
  
    for(Integer l=0;l<revenueListFULL.size();l++)
  {
  if(revenueListFULL[l].Total_Value_by_Forecast__c!=null)
    {
    Amount7=Amount7+revenueListFULL[l].Total_Value_by_Forecast__c;
    }
    Amount8=Amount7+op.Setup_Fee__c;

  }

  for(Integer m=0;m<revenueListFY .size();m++)
  {
  if(revenueListFY [m].Total_Value_by_Forecast__c!=null)
    {
    Amount6=Amount6+revenueListFY [m].Total_Value_by_Forecast__c;
    }
  }                      
  
 op.Current_Year_Fee_Value1__c=Amount4;
 op.Next_FY_Fee_Value__c=Amount6;
  op.Amount=Amount8;
}
}
I need to extend my mass edit functionality to include some fields from child records  - i have a child object to opportunities called forecast and each opportunity can have only one forecast record. So in the mass edit function from the opportunity list view, i would like to include a field from the forecast. The expected end result - i should be able to edit the opportunities selected from the opportunity list view and edit page should include the one field from its child object "forecast". So SAVE would update both the opportunity and its child record.

Can you please guide me on how to customize the mass edit funciton to incorporate this change?
Hi Experts,
I am trying to solve this challenge but not able to solve because of salesfore license issue. Salesforce only allows 2 'Salesfoce' license for DE. Is there a way to solve this challenge? Please help.

Create a Profile and Permission Set to properly handle field access
The Marketing Coordinator and Account Manager both require access to view and update Account Records, but only the Account Manager should be able to see and edit certain fields. Specifically, only the Account Manager should be able to see and edit the Rating field. The Marketing Coordinator should not be able to see or edit the Rating field. Create one profile and one permission set with the appropriate field-level security to solve for this use case.The profile must be named 'Basic Account User' and result in an API name of 'Basic_Account_User'. It should use the 'Salesforce' user license type.
The permission set must be named ‘Account Rating’ and result in an API name of 'Account_Rating'.
I have a VF email template that I want to use for approval email alerts.  I want to have the attachments associated with the object being sent for approval attached to the email alert.  Thus far, i am only able to get the attachments to 'list' on a PDF versus attach.  The portion of the email alert is below pertaining to the attachments.  Am I missing a component that pulls the attachments as attachments or something else?  Any help is greatly appreciated as I've looked through help text and am unable to find solution that works.


</messaging:htmlEmailBody>  


<messaging:attachment renderAs="PDF" filename="CDR Approval.pdf">
<apex:repeat var="files" value="{!relatedTo.Attachments}">
{!files.name}
</apex:repeat>



</messaging:attachment>

</messaging:emailTemplate>

i need help on test class for the below class (i took it from the internet and modified to fit my requirement). I am not from development backgroup, so yours help is much appreciated.

 

public class RSInsert{
Apexpages.StandardController controller;
public RSInsert(Apexpages.StandardController c){ 
    controller = c;
    }
public PageReference save() { 
controller.save();
 PageReference onn = new PageReference('https://cs30.salesforce.com/apex/FTESampleEdit?id='+controller.getId());
    Onn.setRedirect(true);    
    return onn;     //return Apexpages.currentPage(); 
    }
}