• SFDCbox
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies
Hello All,

I have a requirement where i need to assign an account to One user when a date is met.I can do this.But then, this user should be able to assign it to his/her team members(Fixed Team of 10 Members).NB: I cannot use the role heirarchy, sharing rules or the permission set with Modify All Data and that is making it difficult for me to think of...
Any Ideas much appreciated.

Many Thanks
Hello All,

I am writing a batch and have got the following query. This is working fine but need some ideas if there is a room to improve this query so that i do encounter any error on this.
 
List<Case> allCaseWithEventList = [select id, casenumber,(SELECT whatid, ActivityDateTime,EndDateTime,Id,StartDateTime,Subject,Type FROM Events where isDeleted = false and recordtype.developername = 'Mock_Back') from case where  status = 'New' and campaign__c <> null and campaign__c in (select id from campaign where enddate <= TODAY)];
        for(Case case_to_close : allCaseWithEventList){
            if(case_to_close.status=='Call_Back' && case_to_close.Events!=Null){
                for(Event eve : case_to_close.Events){
                    if(eve.EndDateTime <> null && eve.EndDateTime <= System.now()){
                        if(eve.Type <> null && (eve.Type <> 'DMC Call Back' && eve.Type <> 'Non DMC Call Back' && eve.Type <> 'Renewal Date Call back') ){
                            setofCaseIdsToBeClosed.add(eve.whatid);
                        }
                    }
                }
            }



Many Thanks

            if(case_to_close.status=='New' && case_to_close.Events == Null){
                setofCaseIdsToBeClosed.add(case_to_close.Id);
            }
        }
Hello All,

I have a requirement, while adding the campaign Members, when i have selected the members and trying to Add them to campaign a VF page needs to be invoked displaying all the members(Lead/Contact) I have selected who are also the part of   another overlapping campaign. I should then be able to remove them from another campaign or uns3elect them from the campaign i am adding them to now. Please suggest a strategy/approach to acheive this.

Many Thanks
B
Hello All,
I have got an After Update  trigger on Campaign which updates will update the Status of related Campaign Members (Lead/Contacts) when a campaign is updated to Active. I am invoking a batch job with a batch of 200, to update the lead and contact status. I know there can only be 5 batch jobs running simultaneously. How can i avoid getting the governer limits exception in case when i have a huge campaign?

Many Thanks in advance.

I am wondering if I have to query other stages with prospecting so how I wrote below soql query:1
String query = 'Select Id, Name, Stage_change_reminder_count__c,StageName From Opportunity WHERE StageName = \'Prospecting\', \'Value Proposition\', \'Process Review\',\’ Validation\' and Open_Tasks__c=0 and Last_Activity_Age__c >=12 ';
But it’s not working why? cann any one help me please.
 
Hello All,

I have a requirement where i need to assign an account to One user when a date is met.I can do this.But then, this user should be able to assign it to his/her team members(Fixed Team of 10 Members).NB: I cannot use the role heirarchy, sharing rules or the permission set with Modify All Data and that is making it difficult for me to think of...
Any Ideas much appreciated.

Many Thanks
Hello All,
I have got an After Update  trigger on Campaign which updates will update the Status of related Campaign Members (Lead/Contacts) when a campaign is updated to Active. I am invoking a batch job with a batch of 200, to update the lead and contact status. I know there can only be 5 batch jobs running simultaneously. How can i avoid getting the governer limits exception in case when i have a huge campaign?

Many Thanks in advance.
Hi,
I have written the below trigger to update the campaign member status. But its not working and i am not able to figure out why
Thanks for help in advance.

trigger UpdateCampaignStatus on FeedBack__c (after insert,after update) {
    try{
    set<id> fid=new set<id>();
    for(feedback__c fb:trigger.new)
    {
        if(fb.recordtypeid=='01250000000UNZH')
        {
            list <CampaignMember> cm=[select id,status from CampaignMember where contactid=:fb.contact__c and campaignid=:fb.Campaign__c];
            cm[0].status='Completed';
            Update cm[0];
        }     
    }
    }catch(exception e)
    {
        system.debug(e.getmessage());
    }
        }