I'm using ConfirmationDialog to show a confirmation modal when user clicks a button. That's the method I use:

confirmClick: function(eventName, modelMethod, model, tag) {
	this.showConfirmationDialog(this.get("Resources.Strings.ConfirmMessage"),
	function(returnCode) {
		if (returnCode === this.Terrasoft.MessageBoxButtons.YES.returnCode) {
			this.onProcessActionButtonClick(eventName, modelMethod, model, tag);
		}
	},
	[this.Terrasoft.MessageBoxButtons.YES.returnCode, this.Terrasoft.MessageBoxButtons.NO.returnCode],
	null);
}

The problem is that the YES and NO buttons don't get translated to my language:

Do you know what should I do to translate them?

Like 0

Like

1 comments

Dear Carlos,

The buttons' captions are stored in the system core resources. Therefore, button captions are set in accordance with the user profile language. In case you have deployed/supplied with application, that has your language by default, but captions are in English, please give us an email to support@bpmonline.com and we will investigate the issue further.

Regards,

Anastasia

Show all comments

I tried to add a custom button to an edit page, so I inserted the following code to the diff array:

{
	"operation": "insert",
	"parentName": "LeftContainer",
	"propertyName": "items",
	"name": "CustomButton",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": {"bindTo": "Resources.Strings.CustomButtonCaption"},
		"classes": {"textClass": "actions-button-margin-right"},
		"click": {"bindTo": "customAction"},
		"style": Terrasoft.controls.ButtonEnums.style.GREEN,
		"tag": "custom",
		"markerValue": "CustomButton"
	},
	"visible": true,
	"index": 4
}

The button is shown if I enter the edit page directly by coping and pasting its URL or refreshing the page but if I enter it from the section's main page, it is not shown. Do you know how to fix this problem?

Like 0

Like

4 comments

Hello!

You need to add the following button to the section schema as well and you will see the button you need.

Matt

I tried to do that and my code in UsrCustomEntitySection.js is:

 

{
	"operation": "insert",
	"parentName": "SeparateModeActionButtonsLeftContainer",
	"propertyName": "items",
	"name": "CustomButton",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": {"bindTo": "Resources.Strings.CustomButtonCaption"},
		"classes": {"textClass": "actions-button-margin-right"},
		"click": {"bindTo": "customAction"},
		"style": Terrasoft.controls.ButtonEnums.style.GREEN,
		"tag": "custom",
		"markerValue": "CustomButton",
	},
	"index": 4
}

The button appears on the section page but still not on the edit page (except when reloading it).

Carlos Zaldivar Batista,

Hello.

Please make sure you have done the necessary modifications according to the article below:

https://academy.bpmonline.com/documents/technic-sdk/7-12/adding-button-…

Matt

Matt Watts,

Ok, thank you, it works. I didn't find this article myself.

Show all comments

What are the conditions to filter and get the "Overdue invoices"?

Like 0

Like

1 comments

Hello.

First of all, the invoices do not have the due date out of the box, but you can use the date field instead. You need to add a condition, that the date is less than the current date and the invoice status is not final.

Best regards,

Matt

Show all comments

I really need to solve this question , even a part of them

-Create new filter “Attention” in the Activity section grid page (near Owner and Date filters). When turned on, only overdue activities and high priority 

 today activities should be displayed. Filter should use current user time zone.

 (using code and not filter manually)

Like 0

Like

2 comments

In ActivitySectionV2 do it by analogy with this example

1) Create new filter near Owner and Date filters

{

    "operation": "insert",

    "parentName": "IsActiveFiltersContainer",

    "propertyName": "items",

    "name": "IsActiveCheckbox",

    "values": {

        "bindTo": "IsActive",

        "caption": "Активные",

        "controlConfig": {

            "className": "Terrasoft.CheckBoxEdit",

            "checkedchanged": {

                "bindTo": "onIsActiveCheckboxChecked"

            }

        }

    }

}

2)

getFilters: function () {

    var sectionFilters = this.callParent(arguments);

    this.setIsActiveFilter(sectionFilters);

    //this.setCommunicationFilter(sectionFilters);

    return sectionFilters;

},

setIsActiveFilter: function (filterCollection) {

    var isActive = this.get("IsActive");

    if (isActive) {

        if (!filterCollection.contains("IsActiveFilter")) {

            filterCollection.add("IsActiveFilter", this.Terrasoft.createColumnIsNullFilter("Account"));

        }

    } else {

        filterCollection.removeByKey("IsActiveFilter");

    }

},  

onIsActiveCheckboxChecked: function (value) {

                if (!this.get("IsSectionVisible")) {

                    return;

                }

                this.set("IsActive", value);

                this.sandbox.publish("FiltersChanged", null, [this.sandbox.id]);

                this.reloadGridData();

            },       

3)Add atribute "IsActive"

attributes: {

      "IsActive": {

          "dataValueType": this.Terrasoft.DataValueType.BOOLEAN,

          "type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

           "value": true

            },

        }

}

Hello!

Please see a comment from Grigoriy above, this would help you implement your idea.

Matt

Show all comments

Hi Team,

Does anybody worked on Single sign on between BPMonline and other application? I have a button in the Contacts object which will redirects to the another cloud application. This button will open app in a seperate tab and user needs to login manually. I need to login to other application with BPM User name and password automatically. Currently my BPMOnline application is a cloud instance. I have read about one login and I am able to login to other application from one login but not from BPMOnline.

Please help if you have any solution.

Thanks,

Venkat.

Like 0

Like

1 comments

Hello,

You can use the SSO credentials to enter bpmonline system as well as other websites you choose, but you can’t use bpm’online credentials to log in to the external resources.

Show all comments

Question :

On the Product edit page, develop a new button or action for calculating product popularity. Popularity is calculated as the ratio of the number 

 of products in invoice records that contain the current product, to the total number of products in invoice records. Display the calculation result 

 as a percentage using the message window.

how to solve it by esq?

Like 0

Like

1 comments

Dear Mohamad,

Please see the ESQ example below. The method can be triggered by the button click on th product page.

checkProductNumber: function() {
				var currentProduct = this.get("Id");
				var esq = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "InvoiceProduct" });
				esq.addColumn("Product");
				esq.filters.add("Product", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "Product", currentProduct));
				esq.getEntityCollection(function(response) {
					if (response && response.success) {
						var quantity = response.collection.collection.length;
						if (quantity > 0) {
							var esq1 = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "InvoiceProduct" });
							esq1.addColumn("Id");
							esq1.getEntityCollection(function(result) {
								if (result && result.success) {
									var total = result.collection.collection.length;
									this.showInformationDialog(quantity / total);
								}
							}, this);
						} else {
							this.showInformationDialog("This product is not indicated in any invoice.");
						}
					}
				}, this);
			}

Hope you will find it helpful.

Regards, 

Anastasia

Show all comments

 Please help with this question :

Configure settings so that a user cannot save an invoice if the total amount of a customer's debt (taking into account the amount of the current invoice) exceeds $4,000.

 

what this mean and how to solve it?

Like 0

Like

1 comments

Hello, what you described is an object logic (validation) than can be both created and deleted with code only by a skilled developer.

In many cases our customers implement similar logic purposefully.

If you need our help in resolving this case, please, let us know. 

Show all comments

Hi everyone,



I have query:

SELECT (
	SELECT
		count(DISTINCT(c.id))
	-- c.id, c.name
	FROM flight_detail fd
		JOIN contact c
			ON c.id = fd.contact_id
		WHERE
			-- get last year 
			(fd.departure_date >= '2016-09-01' AND fd.departure_date <= '2017-09-30')	
			AND
			-- get this year
			fd.contact_id IN (
				SELECT fd_ly.contact_id
				FROM flight_detail fd_ly
				WHERE 
					fd_ly.departure_date >= '2017-09-01' AND fd_ly.departure_date <= '2018-09-30'
			)
) AS 'Customer Last Year Who Still Buy Ticket This Year',
(
	SELECT
		count(DISTINCT(c.id))
		-- c.id, c.name
	FROM flight_detail fd
		JOIN contact c
			ON c.id = fd.contact_id
		WHERE
			-- get last year 
			(fd.departure_date >= '2016-09-01' AND fd.departure_date <= '2017-09-30')
) AS 'Customer Last Year';

How to transform query to JSON format for sending data paramater DataService.

This query for get data from bpm and I want show the result to my 3rd app.



Thanks.

Like 0

Like

1 comments

Dear Romadan,

Not all queries can be easily translated in a single DataService request. In the most complex cases consider refactoring a query into few smaller queries and sending them one by one storing the result from first query and passing it as a parameter to the next query. 

Show all comments

Hello community,

I am trying to perform the following command from a Script Task element:

DELETE FROM [dbo].[UsrListDocuments] WHERE [Opportunity] = @P1 AND [Product] = @P2

Currently, the C# code is similar to this:

var opportunityId = Get("Read opportunity product.Opportunity");
var productId = Get("Read opportunity product.Product");
var delete = new Delete(userConnection)
        .From("UsrListDocuments")
        .Where("Opportunity").IsEqual(opportunityId)
        .Where("Product").IsEqual(productId);
        
return true;

Is this accurate? What would be the best practice in this case? The code is not working properly that´s why I am looking for your assistance.

Thanks.

Like 0

Like

2 comments

Hello,

As far as I understood your business goal, you are trying to fetch some parameters via [Read Data] element in your script task and pass it further to the Delete query.



Firstly, you need to get parameters in the [Script Task] from the [Read Data] element.

For the interpreted process the algorithm is the next:

1) Create a business process parameters and map it to the needed Read Data element. You can learn more about business parameters in our guide - https://academy.bpmonline.com/documents/technic-bpms/7-12/how-add-param…

In your example it will be something like:

[#Read opportunity product.First item of resulting collection.Opportunity#] and [#Read opportunity product.First item of resulting collection.Product#]

2) Use business-parameters in your Script-task.

var opportunityId = Get<Guid>("ProcessParam1");

var productId = Get<Guid>("ProcessParam2");

Then you need to get the userConnection in order to pass it in the Delete query:

var userConnection = Get<UserConnection>("UserConnection"); 

After that you can create a delete query:

var delete = new Delete(userConnection)

        .From("UsrListDocuments")

        .Where("Opportunity").IsEqual(opportunityId)

        .Where("Product").IsEqual(productId);

        

And execute it:

 delete.execute();

Tetiana Markova,

Thanks, Thetiana. It worked.

Show all comments

Hi Community,

 

I am commiting changes on my package to SVN repository and I got this error "ROOT CAUSE INCONSISTENT LINE ENDING STYLE" (please see image below), how can I fix this error? Thanks

 

 

Like 0

Like

2 comments

Hello,

Could you please, specify the way ActivityPageV2 was created? Did you change it via Section Wizard or create a replacing module in the Configuration manually?

If the source code of the replacing schema for ActivityPageV2 was changed manually, it is possible that UNIX and WINDOWS line end characters exist in the Activity page edit schema.

You need to set only UNIX EOL. Please, see solution here - https://stackoverflow.com/questions/917392/how-should-i-fix-svn-inconsi…

Hi Fulgen,

I have gotten this a lot. 

Simply open the schema this is causing this issue and save the schema in the advance settings. This should work.

Show all comments