Cannot refresh page in single click

I'm using this.reloadEntity() to refresh page, but the problem is i have to double click a button to refresh a page. Any idea for this case?

             messageHandler: function(args) {

                this.set("UsrIsLead", "1");

                this.save({ isSilent: true });

            },

            onOpenPrimaryContactClick: function() {

                this.reloadEntity();

                this.messageHandler();

            }

Like 0

Like

1 comments

Try to debug the functionality. I've just tried the JS code specified below and it worked every time.

define("ContactPageV2", [], function() {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			getActions: function() {
				var actionMenuItems = this.callParent(arguments);
				actionMenuItems.addItem(this.getButtonMenuItem({
					"Caption": "testBtn",
					"Tag": "testMethod",
					"Visible": true
				}));
				return actionMenuItems;
			},
			testMethod: function(){
				this.reloadEntity();
			}
		},
		rules: {}
	};
});

 

Show all comments