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

Hello Community!

I have a query with aggregation SUM in products. But need SUMa field depend of the category.

How can make a subquery to sum based a condition 

Regards,

 

				esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrCost",
						this.Terrasoft.AggregationType.SUM, "ProductCost");
				esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrProfit",
						this.Terrasoft.AggregationType.SUM, "ProductProfit");
 
//Only if category of product is xxxxx sum the price
				esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrPrice",
						this.Terrasoft.AggregationType.SUM, "ProductProfit");

 

Like 0

Like

1 comments

Hello Federico,

Unfortunately, there is no way to create a complex query with subqueries via client ESQ.

You can create a business-process that will perform the request to the database, fetch all needed data, process it and display on the page.

Show all comments

Hi Community,

Good Day

I have tried this one

https://academy.bpmonline.com/documents/technic-sdk/7-12/dataservice-ad…

Using C# console application project we can insert data to BPM online,

 

My question is, how about adding multiple records? or do I need to re initialize all of this and trigger POST method in every record that I will insert.

 

Thanks

Like 0

Like

1 comments

Hi Everyone.



I have 2 section, section Contact and Flight Detail (FD). Both are connected (FD is detail of Contact).

I want to display just apart of data of the detail were have conditions below:

Contact.Email == FD.Email AND Contact.Full Name == FD.Full Name

For example, I open data Contact with Full Name = “ALI BABA” and when I saw detail FD, the detail automatically only display data as the conditions above.

the picture below display all data of detail, while I want to display is data in the red circle.

How to implement that? any solution or trick ?



Thanks



*SOLVED

I found posting with same question https://community.bpmonline.com/questions/system-filter-detail-list.

Like 0

Like

1 comments

Dear Romadan,

In order to achieve such task you can use filter group approach. 

You can also check the article below for additional instructions on types of filters and filter group itself:

https://academy.bpmonline.com/documents/technic-sdk/7-12/using-filtrati…

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

Regards,

Anastasia

Show all comments

Hi,

I've got some weird problems with ProcessEngineService.svc. I'm trying to run a process with parameter sent via POST. In most cases it works fine, but sometimes the process starts with blank parameter (despite proper HTTP response code 200 "Ok"). There are no differences with request data. It is totally random whether it works or not. On new installation my process starts but also without values in parameter. Response code is 200 (Ok). I'm using the same code, the same version of software etc.

My client and process are based on this thread: https://community.terrasoft.ru/questions/processengineservicesvc-i-meto…



What could be the cause of the problem ? Thanks in advance for comments and advice.

Like 0

Like

1 comments

Dear Tomasz,

Unfortunately, it is not possible to determine the exact cause based on provided information. I would recommend you to set up logging on both sides. In this case you would be able to find coincidences based on logs and possible reasons for empty parameter issue.

Though, once you will retrieve possible causes, please let us know and we will be happy to assist you.

Regards, 

Anastasia

Show all comments

I normally get UserConnection from HttpContext and then use it to access the database. Now, when dealing with a business process that starts after a signal, HttpContext.Current is empty. Is there some default UserConnection that I can access?

Like 0

Like

2 comments

Hello Carlos,

 

In order to obtain the UserConnection in the script-task element of the business-process, please use the following syntax:

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

Ok, thank you, it works.

Show all comments

Hi Community,

 

I want to open a look up which by default has already selected records, please see image below. Lets say, I have look up "Main Activity". I want record "Main Activity A" by default was checked upon opening the look up window. 

Thanks

 

 

Like 0

Like

1 comments

Dear Fulgen,

In order to add such functionality you will need to proceed with custom development to the basic functionality.

Overall, this would be a major development, and we highly do not recommend to interfere with basic functionality, since it can caused unexpected system behavior. 

If you decide to go for development within the system, you will need to do the following:

- Add the LookupUtilitiesV2 to the dependencies of the schema, where lookup is located;

- Override the basic schema BaseLookupPageV2;

- BaseLookupPageV2 contains various methods, which are responsible for opening of the lookup and processing user actions. It also contains an attribute  'SelectedRows', which you might need in your development.

- Override the basic method opening the lookup, so to retrieve the collection of objects, before they are rendered on the page. Modify or add the needed object to selected rows. 

- Add the clause, that your functionality will only execute for particular schema/lookup/section/page, since BaseLookupPageV2 is a parent schema for other lookups in the system.

Regards, 

Anastasia

Show all comments