Question

Add to save Activity function

Hello all.  I am trying to add a "showInformationDialog" When an certain type and category activity is saved. Through the front end I think I need to find the right method for when an Activity is saved. How would I do that? Can you point me in the right direction in the docs?

 

Thank you

Like 2

Like

4 comments

Hi Keith, 



Could you please elaborate a bit on what you're trying to achieve? 



So far, if i understand your task correctly, you'd need to use either save or  onSaved method of ActivityPageV2, but I'd be able to tell you more precisely when we have more information on your task. 

 

Yurii S.

 

When a new Activity of Type meeting,  category  xxx  is created/saved I want to pop a box with a message. 

keith schmitt,

 

Please see the code below, you'd need to implement this call on "OnSaved" method. 

I used "Visit" as "Meeting" is not available in OOB version of the application. 



 

define("ActivityPageV2", ['ConfigurationConstants'], function(ConfigurationConstants) {
    return {
        entitySchemaName: "Activity",
        messages: {},
        methods: {
            onSaved: function() {
            if(this.get("Type").value === ConfigurationConstants.Activity.Type.Visit) { 
                Terrasoft.showInformation('Message content');
                       } 
            this.callParent(arguments);
        },     
        },
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
    };
});

Best regards,

Yurii

Many thanks. Worked Very well.

Show all comments