[SalesForce] copy data from one object to another object before saving

I have two objects phase and task. Task is hvng a lookup to phase object. When I will create a task under phase, task name should autopopulate by phase name before saving task record. Please let me know how to proceed.
Regards

Best Answer

The Task Name field (API Name WhoId) is actually a Lookup to either Contact or Lead so it will not be possible to give it the value of your Phase object.

The Related To field (API Name WhatId) is a Lookup to many objects including your Phase object so the Phase Name will show up there.

If you absolutely need to have a field labeled Name display the Phase Name you could create a Custom field and Label it Name, but this may become confusing in other places and if you go that route you may want to consider changing the label on field with API Name WhoId that has label of Name.

Related Topic