Find Jobs
Hire Freelancers

Salesforce APEX triggers to measure Account activities

€30-250 EUR

Completed
Posted over 9 years ago

€30-250 EUR

Paid on delivery
Pear the object Account, the following fields have to be created: 1) number_of_next_activities__c 2) next_activity_date__c 3) number_of_past_activities__c 4) number_of_past_calls__c Behaviour 1) The field number_of_next_activities__c has to ALWAYS include a number that is the sum of: - the number of TASKS that are with status=NOT COMPLETED - the number of EVENTS that are with date=in the future 2) The field next_activity_date__c has to ALWAYS include the date/time of the next soonest activity which: - is a TASK and is NOT COMPLETED - OR is and EVENT and is in the FUTURE 3) The field number_of_past_activities__c has to ALWAYS include a number that is the sum of: - the number of TASKS that are with status=COMPLETED - the number of EVENTS that are with date=in the past 4) The field number_of_past_activities__c has to ALWAYS include a number that is the sum of: - the number of TASKS that are with status=COMPLETED and include the word "call" in the subject - the number of EVENTS that are with date=in the past and include the word "call" in the subject A trigger should be executed every time a change on a TASK happen (change of status, change of date, change of subject, change of related account/lead/object) A trigger should be executed every time a change on an EVENT happen (change of date, change of subject, change of related account/lead/object) OR when it moves from the future to the past as time passes (at the time of the event). bulk changes have to be supported. 100% coverage is required. TEST CASES: A) account TESTACCOUNT is created. It has no activity. The values must be: - number_of_next_activities__c 0 - next_activity_date__c BLANK - number_of_past_activities__c 0 - number_of_past_calls__c 0 B) an activity TASKA is created with date=tomorrow, subject=sendemail status=not started. - number_of_next_activities__c 1 - next_activity_date__c tomorrow - number_of_past_activities__c 0 - number_of_past_calls__c 0 C) the task TASKA is set as COMPLETED - number_of_next_activities__c 0 - next_activity_date__c BLANK - number_of_past_activities__c 1 - number_of_past_calls__c 0 D) the task TASKA is updated changing subject from sendemail to docall - number_of_next_activities__c 0 - next_activity_date__c BLANK - number_of_past_activities__c 1 - number_of_past_calls__c 1 E) an event EVENTA is create with date=tomorrow, subject=callmark - number_of_next_activities__c 1 - next_activity_date__c tomorrow - number_of_past_activities__c 1 - number_of_past_calls__c 1 F) a task TASKB is created with date=dayaftertomorrow, subject=calljohn - number_of_next_activities__c 2 - next_activity_date__c tomorrow - number_of_past_activities__c 1 - number_of_past_calls__c 1 G) EVENTA is moved from tomorrow to yesterday - number_of_next_activities__c 1 - next_activity_date__c dayaftertomorrow - number_of_past_activities__c 2 - number_of_past_calls__c 2
Project ID: 6761968

About the project

1 proposal
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, Sebastiano, clearly described, I can have it for Monday, fully tested and with movie. Actually I think that in the last behavior you have repeated a previous one. I believe that you meant number_of_future_activities__c
€166 EUR in 4 days
5.0 (7 reviews)
5.3
5.3

About the client

Flag of ITALY
Milano, Italy
4.6
8
Payment method verified
Member since Oct 11, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.