Hi all,

        I inserted a custom button in a section

diff: /**SCHEMA_DIFF*/[

            // Metadata for adding a cutom button to the page.

            {

                // Indicates that an operation of adding an item to the page is being executed.

                "operation": "insert",

                // Meta-name of the parent control item where the button is added.

                "parentName": "CombinedModeActionButtonsCardLeftContainer",

                // Indicates that the button is added to the control items collection

                // of the parent item (which name is specified in the parentName).

                "propertyName": "items",

                // Meta-name of the added button. .

                "name": "MainContactButton",

                // Supplementary properties of the item.

                "values": {

                    // Type of the added item is button.

                    itemType: Terrasoft.ViewItemType.BUTTON,

                    // Binding the button title to a localizable string of the schema.

                    caption: {bindTo: "getSendButtonCaption"},

                    // Binding the button press handler method.

                    click: {bindTo: "onSendClick"},

                    // Binding the property of the button availability.

                    enabled: {bindTo: "canSend"},

                    visible: {bindTo: "showButtonSend"},

                    style: Terrasoft.controls.ButtonEnums.style.GREEN,

                    // Setting the field location.

                    "layout": {

                        "column": 1,

                        "row": 6,

                        "colSpan": 1

                    }

                }

            }

        ]

I have bind its caption with a function "getSendButtonCaption", but it doesn't work when I changed value

getSendButtonCaption: function() {

                var activeRow = this.get("ActiveRow");

                if (activeRow) {

                    var sendTime = this.get("GridData").get(activeRow).get("UsrSendTime");

                    if (sendTime) {

                        if (sendTime.value.toUpperCase() === "FC73B30F-9E29-48BA-8A9E-3C4247CFF22A") {

                            return this.get("Resources.Strings.SendManuallyButtonCaption");    

                        } else if (sendTime.value.toUpperCase() === "47AB118D-84C9-4846-B916-8DC40CF0B333") {

                            return this.get("Resources.Strings.ScheduleSendButtonCaption");

                        }

                    }

                }

                return "";

            }

This solution works well in page.Why?

Thanks

Like 0

Like

7 comments

Eugene Podkovka,

Hi Eugene,

          I had read this document before. In that case, the button's caption has bound with resource and doesn't change anymore, but I want to change its caption by changing the value of dropdownlist like the button "Send" in the section "Marketing\Email".

Thanks

Toan Mai,

The button should be added both to the page and to the section. You only added it to the section.

Eugene Podkovka,

I have implemented in section and page. As I said in my question, it only works  in page.

Toan Mai,

No. The code that you added to the post does not contain the part that exists on a page. 

Eugene Podkovka,

Hi Eugene,

         Please send me your email, I will send you my page and section source code or the demo site which had been deployed that package. Or will I send them to support team?

Thanks

Toan Mai,

Try to contact the support.

Show all comments

Hi,

I'm following this article (https://academy.bpmonline.com/documents/technic-sdk/7-12/how-add-button…) and its working but only showing 1 button

in code I tried to add 2 buttons but only the last button is showing

 

Any help will be highly appreciable.

 

Regards

Like 0

Like

4 comments
You must use unique "name" in diff

ex:

                {
                    "operation": "insert",
                    ..
                    "name": "Button1",
                    ..
                },
                {
                    "operation": "insert",
                    ..
                    "name": "Button2",
                    ..
                },
                ...

 

Hello Muhammad,



There is no limit of custom controls on edit page in bpm'online, you are able to add as much customizations as you need.

Please note on Dmitry`s comment, he is right, every control that is added to the edit page should have unique name to prevent collisions.

Please, in future, read articles with instructions more attentively :)

Hello Alex_Tim,

Thank you for suggestion. But kindly note that I realized and issue was already resolved.

If possible please help on other issues I posted I will be very thankful.

 

Regards

Show all comments

Hi,

I need a custom button on dashboard of customer portal.

On click for example Contact create form should appear.

 

I have another idea, OOB on customer's dashboard there is OOB dashlet of Case with "New" button. On click the form is populating and we can create new case.

But on custom dashlet of custom section "Multi Currency" there is no "New" button. Any idea for enabling this button?

 

 

Any help will be highly appreciable.

 

Regards

Like 0

Like

1 comments

Hello Muhammed,

What I recommend to do in this case is to understand how the "new" button is already added on a existing dashlet. 

At first, I recommend to use the chrome debugger and try to search the name of the button in the entire client code (ctrl+shift+f), so you will find where it is added.

Then, after analysis of the code, something similar for your custom object should be implemented.

Also, don`t forget to enable minipage usage in custom section settings.

Hope, my answer will help you.



Regards,

Alex

Show all comments

Hi Community,

Any idea how we can add a custom button on Portal Dashboard same way as adding custom button on edit page. 

 

Like 0

Like

1 comments

Hello Fulgen,



Unfortunately, there is no possibility to add a custom button on dashboard as you do it on edit page.

I suggest to add a new action in "Actions" dropdown instead. https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-section-action-handling-selection-several-records

Show all comments

Hi Community,

I have a custom section, I added a custom button on edit view and button is visible on CRM and Customer portal as well.

On CRM that button is functional and on click the pdf is successfully downloading.

But on Customer portal that button is only visible and on click the pdf is not downloading.

from this post ( https://community.bpmonline.com/articles/how-show-printables-print-butt…) I come to know that I need to apply some permissions to enable OOB printable functionality for customer portal. I tried to apply all from this post but that button is still not functional and not downloading pdf (only button is appearing on edit view)

but since I'm not using OOB printable and I'm using custom button so may be there will be another solution to fix this issue like we need to add some code for enabling that button to download.

 

 

 

 

Like 0

Like

1 comments

Please deploy the application locally and debug the functionality. This way you'll find what exactly wrong. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/server-code-de…

The main idea is that you need to give portal users access rights for all objects that you use in the printables. 

Show all comments