Populate a Date field in Leads_FormPage from AddTaskMiniPage

Hello Community,

We have created a button in Leads_FormPage that opens AddTaskMiniPage

Code in Leads_FormPage that opens the AddTaskMiniPage

  {
        request: "usr.OpenTaskModalPageRequest",
        handler: async (request, next) => {
            const handlerChain = sdk.HandlerChainService.instance;
            await handlerChain.process({
                type: 'crt.OpenPageRequest',
                schemaName: 'AddTaskMiniPage',
                $context: request.$context,
                scopes: [...request.scopes]
            });
            return next?.handle(request);
        }
    }		,

 

Our end goal: We want that upon the Activity is created (Save button clicked in AddTaskMiniPage) the value of 'Start' field in AddTaskMiniPage, is copied to another Date field in the Leads_FormPage.

How can this be acheived?

Regards

Sasor

Like 0

Like

3 comments

Hello Sasori,

You can try using BP for this case. For example, when you save a record in a mini page, you also run a business process that will update a value in your lead record. You pass date value to the BP and set (update) relevant field in the lead record. 
 

An easy way to accomplish this is to just use a process with a signal of Activity added with Type=Task, Category=To do, Lead is filled in. Then update the lead with the date. If you have live data updates enabled for the Lead object you'll even see the screen refresh with the value. 

Ryan

Ryan Farley,

Thank you for your input! However, the challenge with this approach is that there might be multiple activities associated with a single Lead that have this specific configuration (Type = Task, Category = To Do, Lead is filled in).

Would it be possible to handle this scenario directly via the Frontend instead?

Looking forward to your thoughts!

Show all comments