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
tganikumartganikumar 

Once create a new project then automatically some tasks will added to that project.

Hi 

 

I have two custom objects like Projects and Tasks, then i have the project lookup in tasks object. But Whenever i create one project means(Quality of Project) the particular tasks will create automatically (

  • Bug Fixes
  • Communication
  • Configuration
  • Data Conversion
  • Defect Resolution
  • Deployment
  • Design
  • Development
  • Development Review
  • Documentation
  • Graphic Design
  • Meetings
  • Planning
  • R&D
  • Requirements
  • Testing
  • Training

). These are tasks when i create one project and also i will create another tasks my own. But these tasks are default to every project. 

 Is this possible with trigger or anything else? 

 

Please give the answer as soon as possible?

HariDineshHariDinesh

Hi,

 

Yes this possible through Apex controller and trigger.

Write trigger on Project object (Master) and write code in after insert event.

Get the id of the Project and pass it as parameter for one method in controller class.

Receive the ID of the Project object and create record in Task object such that every record having lookup with that ID.

By the end of this your project will have Childs of Tasks you required.

 

Try to write Trigger and Class as mentioned, if you need any help in that coding please let me know.