Hi,

I need help on following issue of Action Button .



I am getting an error while adding a button in button with a drop-down menu (inside Action Button).



The button displaying only in add mode. But when I try to open edit mode the added button is not displaying.



I try both the attribute and not the attribute method to display the added button.



I have to reload the page again after the open page in edit mode.



The piece of code is as follows :



getActions: function () {

var actionMenuItems = this.callParent(arguments);

actionMenuItems.addItem(this.getButtonMenuSeparator());

// Adding a separator line.

actionMenuItems.addItem(this.getButtonMenuItem({

"Caption": "Create Policy",

"Tag": "callCustomProcess",

"Enabled": {"bindTo": "PolicyButtonVisible"}  // as attribute

}));

actionMenuItems.addItem(this.getButtonMenuSeparator());

actionMenuItems.addItem(this.getButtonMenuItem({

"Caption": "Calculate Premium",  // I have to write plain text because it was not visible 

"Tag": "onCalculatePremiumClick",

"Enabled": {"bindTo": "PremiumButtonVisible"}  as attribute

}));



return actionMenuItems;

},



Please let me know if it requires any further explanation.

 

Like 0

Like

3 comments

Hi Anyone can help on this issue.

 

Dear Jitendra,

 

Most probably, the issue happens because you didn’t create a replacing schema for the section page and didn’t add the code to this schema that check if these actions are enabled. Please find more information about it in the article by the link below (chapters 4-6):

 

https://academy.creatio.com/documents/technic-sdk/7-16/adding-action-edit-page

 

Best regards,

Norton

jitendra,

 

As Norton answered, there's actually two places you need to add this. Once to the section page and once to the edit page for the section. An edit page can be seen in two different modes, (1) edit mode (where you're only displaying the edit page, this is what you're getting when you refresh the page while in edit mode) and (2) combined mode, this is actually the section page, where it displays the context of the section list you were on with the edit page on the side. 

 

With this in mind, you need to add the action menu in both the edit page and the section page for it to appear in both modes.

 

Ryan

Show all comments