function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jyosi jyosiJyosi jyosi 

Assigning multiple Task to multiple users through Apex code

Hello Everyone,

I have a visual force ,where the users selects contact records and it create a task for the owner or if specify another owner ID in the code.
Here I am have 4 teams,
Need to assign task based on the workload
Suppose if the first task is assigned to one user of first team and another task creates it should assign to 2 user in first team.
 
How can achieve this? If they are any work around could you please suggest me

Regards,
Jyo
 
PratikPratik (Salesforce Developers) 
Hi Jyo,

I have some guidelines which will help you.

Here is the appexchange unmanaged package: 
https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016waPEAQ

You can check this app and tweak it's code to fit in to your requirement.

Hope this will help you!

Thanks,
Pratik