• niranjan e
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
How to remove the task from the activity timeline is it possiable to remove those from the activity timeline 


Thanks in advance
Visual force page for Contact records. The page should display
Contact detail page without the related list,
the related account’s detail view in the same screen
the opportunities to be displayed as a calendar view displayed or categorized as month

how to achive the calander view with the repective opportuninites created on that month ... 
trigger case4trigger on User (after insert , after update) 
{
    list<account>acclist = new list<account>();
    list<account>templist = new list<account>();
    Account acc = new Account();
    User u = new User();
    for(User u : trigger.new)
    {
      acclist =  [select Id,OwnerId,Owner.leave__c,Type,Owner.DelegatedApproverId from Account where OwnerId =: u.Id];
            
    }
    for(Account acc : acclist)
    {
        if(trigger.IsInsert)
        {
            if( acc.Owner.leave__c > 90 && acc.Owner.leave__c <180)
        {
            acc.Type = 'Former Client';
            templist.add(acc);
        }
        system.debug('asdf'+templist);
        if(acc.Owner.DelegatedApproverId!= null && acc.Owner.leave__c >180)
        {
            acc.OwnerId = acc.Owner.DelegatedApproverId ;
            templist.add(acc);
        }
        system.debug('qwerty'+templist);
        if(acc.Owner.DelegatedApproverId == null && acc.Owner.leave__c >180)
        {
             acc.Type = 'deactivated';
             templist.add(acc);
        }
        system.debug('zxcv'+templist);
       }
        if(trigger.IsUpdate)
        {
        if( acc.Owner.leave__c > 90 && acc.Owner.leave__c <180)
        {
            acc.Type = 'Former Client';
            templist.add(acc);
        }
        system.debug('asdf'+templist);
        if(acc.Owner.DelegatedApproverId!= null && acc.Owner.leave__c >180)
        {
            acc.OwnerId = acc.Owner.DelegatedApproverId ;
            templist.add(acc);
        }
        system.debug('qwerty'+templist);
        if(acc.Owner.DelegatedApproverId == null && acc.Owner.leave__c >180)
        {
             acc.Type = 'deactivated';
             templist.add(acc);
        }
        system.debug('zxcv'+templist);
        }
    }
      update templist;
        
}
//component 
<aura:attribute name="Companys" type="Object[]"></aura:attribute>
 <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<ui:inputSelect label="Proviences" class="dynamic" aura:id="InputSelectDynamic" value="{!v.Companys}" change="{!c.onSelectChange}"> required="False">
      <aura:iteration items="{!v.Companys}" var="levels">
          <ui:inputSelectOption text="{!levels.value}" label="{!levels.label}"/>
        </aura:iteration>
//controller 
doInit : function(component, event, helper) {
        var action = component.get("c.getLeadStatus");
        var inputsel = component.find("InputSelectDynamic");
        var opts=[];
        action.setCallback(this, function(a) {
        for(var i=0;i< a.getReturnValue().length;i++){
            opts.push({"class": "optionClass", label: a.getReturnValue()[i], value: a.getReturnValue()[i]});
        }
        inputsel.set("v.Companys", opts);
        component.set("v.Companys",opts);
         });
    $A.enqueueAction(action); 
    },
onSelectChange : function(component, event, helper) {
    var selected = component.find("InputSelectDynamic").get("v.Companys");
         alert('tt'+ selected); /// here i get ttundefined 
     }
//Serverside controller 
 @AuraEnabled
public static List<String> getLeadStatus(){
List<String> options = new List<String>();
Schema.DescribeFieldResult fieldResult = company__c.Province__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for (Schema.PicklistEntry f: ple) {
    options.add(f.getLabel());
}
system.debug('asdf'+options);
return options;}
    
//component 
<aura:attribute name="Companys" type="Object[]"></aura:attribute>
 <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<ui:inputSelect label="Proviences" class="dynamic" aura:id="InputSelectDynamic" value="{!v.Companys}" change="{!c.onSelectChange}"> required="False">
      <aura:iteration items="{!v.Companys}" var="levels">
          <ui:inputSelectOption text="{!levels.value}" label="{!levels.label}"/>
        </aura:iteration>
//controller 
doInit : function(component, event, helper) {
        var action = component.get("c.getLeadStatus");
        var inputsel = component.find("InputSelectDynamic");
        var opts=[];
        action.setCallback(this, function(a) {
        for(var i=0;i< a.getReturnValue().length;i++){
            opts.push({"class": "optionClass", label: a.getReturnValue()[i], value: a.getReturnValue()[i]});
        }
        inputsel.set("v.Companys", opts);
        component.set("v.Companys",opts);
         });
    $A.enqueueAction(action); 
    },
onSelectChange : function(component, event, helper) {
    var selected = component.find("InputSelectDynamic").get("v.Companys");
         alert('tt'+ selected); /// here i get ttundefined 
     }
//Serverside controller 
 @AuraEnabled
public static List<String> getLeadStatus(){
List<String> options = new List<String>();
Schema.DescribeFieldResult fieldResult = company__c.Province__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for (Schema.PicklistEntry f: ple) {
    options.add(f.getLabel());
}
system.debug('asdf'+options);
return options;}