EmailFormPage - freedom

Hello,

In freedomUI, i'm trying to override the EmailFormPage, i would like to filter the recipents list with the current account.

For now i have this non working filter :
           
 {
                request: "crt.HandleViewModelAttributeChangeRequest",
                handler: async (request, next) => {
                    if(request.attributeName == "EmailComposer_RecipientsMailboxes") 
                        {
                            const account = await request.$context.ActivityDS_Account_2vy71yu;
                            
                            const filter = new sdk.FilterGroup();
                            await filter.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "Account", account.value);

                            request.parameters.push({
                                type: "filter",
                                value: filter
                            });
                            
                        }
                    
                    return await next?.handle(request);
                }
            }

How should i fix this ?

Best regards
Patrice

Like 0

Like

0 comments
Show all comments