Question

Location to Customize Activities Quick Add Functionality

Hello All!

I am trying to determine where to customize the Quick Add functionality to create a related Activity. I have attached a few screenshots to illustrate what I am talking about. In the Activities section, when you are on a specific Activity, there is a button with a flag and plus symbol. When you click this to add a related Activity, whether it is a Task, Call, or Email, the Result Details are copied to the new Activity and set as the Title/Subject on that new Activity. We are trying to change which field is copied to the Title/Subject, but I have been unable to determine where and/or how this value is being copied over to the new Activity.



Can anyone please point me in the right direction of where I need to look to customize this functionality?



Thank you!

Chris

Like 1

Like

1 comments

The default values for a newly created related Activity are set in the defQuickAddActivityValuePairs method in the QuickAddMixin schema (https://prnt.sc/r3k57j). Please feel free to override this method in the replacing client module for ActivityPageV2 in order to modify the functionality.

There is an example below:



define("ActivityPageV2", [], function() {

    return {

        entitySchemaName: "Activity",

        attributes: {},

        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,

        methods: {

            

            defQuickAddActivityValuePairs: function() {

                var valuePairs = this.callParent(arguments);

                var newValuePairs = valuePairs.filter(item => item.name !== "Title");

                newValuePairs.push({

                            name: "Title",

                            value: "My new value"

                });

                return newValuePairs;

            }

        

        },

        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,

        diff: /**SCHEMA_DIFF*/[

        

        ]/**SCHEMA_DIFF*/

    };

});

Show all comments