+ Start a Discussion
Dhanamjaya PaidipatDhanamjaya Paidipat 

apex class to create a task

Hello,
Can some one help me to insert a Task for Lead, through Apex class becasue as i need to schedule.
It's very urgent.
Thanks in Advance.
Best Answer chosen by Dhanamjaya Paidipat
Dhanamjaya PaidipatDhanamjaya Paidipat
Thanks Khan Anas :)

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Dhanamjaya,

Greetings to you!

Please refer to the below links which has sample code which might help you with the above issue. Kindly try to implement according to your requirement.

https://developer.salesforce.com/forums/?id=906F0000000DAKzIAO

https://salesforce.stackexchange.com/questions/118214/schedulable-batch-apex-create-tasks

https://developer.salesforce.com/forums/?id=9060G000000UVdFQAW

https://www.mandsconsulting.com/creating-tasks-from-apex-in-salesforce/


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas
Dhanamjaya PaidipatDhanamjaya Paidipat
Thanks Khan Anas :)
This was selected as the best answer
Dhanamjaya PaidipatDhanamjaya Paidipat
Hi Khan,
My requirement is we have Next date if i enter the according to that(Next date) Task should create.
Ex: Task-1 If i enter Next date=12/10/2018 so Task-2 should create automatically on 12th, oct-18.
Kindly help me on this.

Regards,
​Dhanmajaya