• Baktash Hossainzadeh
  • NEWBIE
  • 55 Points
  • Member since 2015
  • Salesforce Developer
  • Freelancer

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
I have following code:

List<user> TLSPuserlist=[Select id,Name,Email from User where UserRole.Name in:userRoles AND IsActive = true];
List<user> lst_TeamLead = new List<user>();       
 for(user u : TLSPuserlist)
{
  set<id> subord= new set<id>();            
  subord=RoleUtilsModified2.getRoleSubordinateUsers(u.Id);
  If(subord.size()>0 && subord!=NULL)
  {
       for(Id id1 : subord)
        {
             If(id1.Last_Edited_Object__c !=NULL && id1.Last_Edited_Object_Date__c > d || id1.Last_Activity_Type__c !=NULL &&    Last_Activity_Date__c > d) 
               {
                        unediteduseridlist.add(id1);
                }
       }
}


I am getting the following error:
Error: Compile Error: Variable does not exist: Last_Activity_Date__c at line 488 column 132

I have the field Last_Activity_Date__c  on User Object...
The subord for loop(  for(Id id1 : subord)  ) contains ids of all users...I need User usL subord kinda thing, so that i can do the logic and go ahead...
 
Hi there,

I'm looking to create a field that automatically populates with the Latest Activity Subject. When pulling reports I need to be able to see the latest activity subject and in the out-of-the-box Salesforce you only have access to Latest Activity Date.

From looking around it seems the only way to do this is to create an apex trigger that will populate a Latest Activity Subject field that I create. I'm fairly new to Salesforce and would really appreciate some A-Z guidance on how to best create this.

Thanks!
I have following code:

List<user> TLSPuserlist=[Select id,Name,Email from User where UserRole.Name in:userRoles AND IsActive = true];
List<user> lst_TeamLead = new List<user>();       
 for(user u : TLSPuserlist)
{
  set<id> subord= new set<id>();            
  subord=RoleUtilsModified2.getRoleSubordinateUsers(u.Id);
  If(subord.size()>0 && subord!=NULL)
  {
       for(Id id1 : subord)
        {
             If(id1.Last_Edited_Object__c !=NULL && id1.Last_Edited_Object_Date__c > d || id1.Last_Activity_Type__c !=NULL &&    Last_Activity_Date__c > d) 
               {
                        unediteduseridlist.add(id1);
                }
       }
}


I am getting the following error:
Error: Compile Error: Variable does not exist: Last_Activity_Date__c at line 488 column 132

I have the field Last_Activity_Date__c  on User Object...
The subord for loop(  for(Id id1 : subord)  ) contains ids of all users...I need User usL subord kinda thing, so that i can do the logic and go ahead...
 
I am trying to create a custom button on Opportunities. I have named he Button "Email Deal Summary". When clicked, I would like the button to update the checkbox field "Email_Deal_Summary_c" to be True. I have used the following javascipt:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 
var opportunity = new sforce.SObject("Opportunity"); 
opportunity.id = "{!Opportunity.Id}"; 
oppportunity.Email_Deal_Summary__c = "True"; 
sforce.connection.update([opportunity]); 
window.location.reload();

Each time I click the button then, I am receiving the error "opportunity is not defined". I am fairly new to creating buttons using javascript. What am I doing wrong?
I am trying to pass opportunity Id from one class to another class and I thought of doing it through URL , but I dotn know how I can add that
Opport Id to this
 
PageReference opptyPage = new ApexPages.StandardController(opportunity).view();
  opptyPage.setRedirect(true);

  return Page.PBXOrdering + opptyPage;

 
I have searched all the answers, but have yet to find the error I am getting. Can someone please explain to me what this means.

Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.:
Hi there,

I'm looking to create a field that automatically populates with the Latest Activity Subject. When pulling reports I need to be able to see the latest activity subject and in the out-of-the-box Salesforce you only have access to Latest Activity Date.

From looking around it seems the only way to do this is to create an apex trigger that will populate a Latest Activity Subject field that I create. I'm fairly new to Salesforce and would really appreciate some A-Z guidance on how to best create this.

Thanks!