Hi
I have a button(Configure Quote) whenever user click the configure button then URL filed (https://www.google.co.in/) contains some url ,which will be open in new tab?
thanks
surseh.
Like
Dear Surseh,
Firstly, you need to assign a click handler method, which will open a needed URL in a new page. In order to do this, please use the following code in you button's diff. The bold text is a handler method we will create further:
"values": { "itemType": Terrasoft.ViewItemType.BUTTON, "click": {"bindTo": "openWindow"} }
Add handler method, which will take value out of URL field and open a new tab:
openWindow: function() { var path = this.get("UsrURL"); window.open(path, '_blank'); }
Hope this solves your task.
Regards,
Anastasia
Thanks Anastasia,but i have to hide the button.
please find the below code.
{
"operation": "insert",
"name": "NewQuoteButton",
"values": {
"itemType": 5,
"style": "green",
"caption": {
"bindTo": "Resources.Strings.NewQuoteButton"
},
"click": {
"bindTo": "onNewQuoteClick"
},
"classes": {
"textClass": [
"actions-button-margin-right"
]
}
}
method
======
methods: {
onNewQuoteClick: function() {
var path = this.get("UsrURL");
window.open(path);
}
}
Dear Surseh,
Can you, please, describe more detailed what you mean by hide the button?
Do you want to hide the button once it is clicked?
I have created a button as shown below. I don't want to activate this button till the record got saved. Can you suggest how to achieve this?
Code to Create a Button:
=====================
{
"operation": "insert",
"name": "NewQuoteButton",
"values": {
"itemType": 5,
"style": "green",
"caption": {
"bindTo": "Resources.Strings.NewQuoteButton"
},
"click": {
"bindTo": "onNewQuoteClick"
},
"classes": {
"textClass": [
"actions-button-margin-right"
]
}
}
Dear Surseh,
Please find the answer to your question in the other thread of the community:
https://community.bpmonline.com/questions/how-hide-button-untill-create…
There Lily Johnson provided a good example for implementation.
Regards,
Anastasia