7.13_()
Studio_Creatio_()

Hello,

I have a problem with a new created attachments detail in a tab.

I have created a new "Event" tab and I have added "Attachments" detail. Also, I have changed the parent for Schema16Detail object to "FileDetailV2 ( UIv2 )".

When I'm trying to upload a file in attachments, I receive the following error:

 

Console errors:

 

Please, help me to solve this errors.

Like 0

Like

3 comments

The entity for the attachments must be named "ParentEntityFile", so in your case that looks like OtpEventFile, and must also have "File" object as it's parent (not base object). Then you'd add a lookup to relate it to the parent OtpEvent.

See this article for more related info: https://academy.creatio.com/documents/technic-sdk/7-15/adding-attachmen…

Ryan

Hello.

I have updated the object as you said, but I receive the same error.

Any ideas? :)

 

I forgot to mention that I moved the Attachments tab inside the Event detail.

Show all comments
currency
fields
multi-currency
7.15_()
Studio_Creatio_()

Hi,

I'm currently trying to add multiple multi-currency fields in the same page. I manage to create one following the developer guide https://academy.creatio.com/documents/technic-sdk/7-12/how-add-multi-cu….

But when i create other multi-currency field, both of them share the currency (not intended).

I would like to create another multi-currency field, independent from the first one.

Best regards.

 

 

Like 0

Like

1 comments

Hi Pedro,



I was able to come up with an example on Order page for fields Amount and Payment Amount. General idea is to duplicate logic for each field separately.



What I was not able to achieve is working with triangle as well (https://prnt.sc/qf6y2b), so I removed it. Also, as I am using Order page it has logic behind with Products detail which should be implemented for different currency fields, but I skipped it. In the custom section it should be all good.



Also note, that after adding new fields to the object, they will be empty. So to make it work, after adding fields you should fill them in using db script for example and then set default value for them (as in the article you mentioned) to make it filled in for all new records.



So here are the steps that I followed:

1. Created new fields in the object for Currency and Currency rate separately for each field. https://prnt.sc/qf6znu

2. Created a generator for field.

 

define("UsrMultiCurrencyEditViewGenerator", ["MultiCurrencyEditViewGenerator"], function() {
 
	Ext.define("Terrasoft.configuration.UsrMultiCurrencyEditViewGenerator", {
		extend: "Terrasoft.MultiCurrencyEditViewGenerator",
		alternateClassName: "Terrasoft.UsrMultiCurrencyEditViewGenerator",
 
		generateCurrencyButton: function(config) {
			var buttonConfig = {
				id: "multiCurrencyButton-currency" + config.name,
				className: "Terrasoft.Button",
				classes: {
					wrapperClass: ["currency-button"]
				},
				style: Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
				menu: {
					items: this.getPropertyBindingConfig(config, "currencyButtonMenuList")
				},
				enabled: true,
				markerValue: config.name + " MultiCurrencyButton"
			};
			return this.generateButton(buttonConfig);
		}
	});
	return Ext.create(Terrasoft.UsrMultiCurrencyEditViewGenerator);
});

3. Modified order page:

 

define("OrderPageV2", ["MoneyModule", "MultiCurrencyEdit", "MultiCurrencyEditUtilities",
"UsrMultiCurrencyEditViewGenerator"],
	function(MoneyModule, MultiCurrencyEdit, MultiCurrencyEditUtilities) {
	return {
		entitySchemaName: "Order",
		attributes: {
			"UsrAmountCurrencyRate": {
				"dependencies": [{
					"columns": ["UsrAmountCurrency"],
					"methodName": "usrSetAmountCurrencyRate"
				}]
			},
			"Amount": {
				"dependencies" : [{
					"columns": ["Amount"],
					"methodName": "usrRecalculateAmount"
				}]
			},
			"UsrPaymentAmountCurrencyRate": {
				"dependencies": [{
					"columns": ["UsrAmountCurrency"],
					"methodName": "usrSetPaymentAmountCurrencyRate"
				}]
			},
			"PaymentAmount": {
				"dependencies" : [{
					"columns": ["PaymentAmount"],
					"methodName": "usrRecalculatePaymentAmount"
				}]
			}
		},
		mixins: {
			MultiCurrencyEditUtilities: "Terrasoft.MultiCurrencyEditUtilities"
		},
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
		methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiCurrencyEditUtilities.init.call(this);
			},
			usrSetAmountCurrencyRate: function() {
				MoneyModule.LoadCurrencyRate.call(this, "UsrAmountCurrency", "UsrAmountCurrencyRate",
					new Date(), function() {
						var currency = this.get("UsrAmountCurrency");
						var division = currency && currency.Division;
						MoneyModule.RecalcCurrencyValue.call(this, "UsrAmountCurrencyRate",
							"Amount", "PrimaryAmount", division);
					}
				);
			},
			usrRecalculateAmount: function() {
				var currency = this.get("UsrAmountCurrency");
				var division = currency && currency.Division;
				MoneyModule.RecalcBaseValue.call(this, "UsrAmountCurrencyRate", "Amount",
					"PrimaryAmount", division);
			},
			usrSetPaymentAmountCurrencyRate: function() {
				MoneyModule.LoadCurrencyRate.call(this, "UsrPaymentAmountCurrency", "UsrPaymentAmountCurrencyRate",
					new Date(), function() {
						var currency = this.get("UsrPaymentAmountCurrency");
						var division = currency && currency.Division;
						MoneyModule.RecalcCurrencyValue.call(this, "UsrPaymentAmountCurrencyRate",
							"PaymentAmount", "PrimaryPaymentAmount", division);
					}
				);
			},
			usrRecalculatePaymentAmount: function() {
				var currency = this.get("UsrPaymentAmountCurrency");
				var division = currency && currency.Division;
				MoneyModule.RecalcBaseValue.call(this, "UsrPaymentAmountCurrencyRate", "PaymentAmount",
					"PrimaryPaymentAmount", division);
			},
 
			onPaymentAmountCurrencyMenuItemClick: function(menuItem) {
				var currency = this.get("CurrencyRateList").find(menuItem);
				this.set("UsrAmountCurrency", currency);
			},
			onAmountCurrencyMenuItemClick: function(menuItem) {
				var currency = this.get("CurrencyRateList").find(menuItem);
				this.set("UsrPaymentAmountCurrency", currency);
			},
			prepareCurrencyMenu: function() {
				this.mixins.MultiCurrencyEditUtilities.prepareCurrencyMenu.call(this);
				var currencyRateList = this.get("CurrencyRateList");
				if (!currencyRateList) {
					return;
				}
				var columnsList = ["Amount", "PaymentAmount"];
				this.Terrasoft.each(columnsList, function(column) {
					var menu = this.Ext.create(this.Terrasoft.BaseViewModelCollection);
					currencyRateList.each(function(item) {
						var menuItem = Ext.create("Terrasoft.BaseViewModel", {
							values: {
								Id: item.value,
								Caption: item.Symbol || item.displayValue,
								MarkerValue: item.Symbol || item.displayValue,
								Tag: item.value,
								Click: {"bindTo": "on" + column + "CurrencyMenuItemClick"}
							}
						});
						menu.addItem(menuItem);
					}, this);
					this.set(column + "CurrencyRateList", menu);
				}, this);
			},
		},
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "merge",
				"name": "Amount",
				"values": {
					"bindTo": "Amount",
					"primaryAmount": "PrimaryAmount",
					"currency": "UsrAmountCurrency",
					"rate": "UsrAmountCurrencyRate",
					"generator": "UsrMultiCurrencyEditViewGenerator.generate"
				}
			},
			{
				"operation": "merge",
				"name": "PaymentAmount",
				"values": {
					"bindTo": "PaymentAmount",
					"primaryAmount": "PrimaryPaymentAmount",
					"currency": "UsrPaymentAmountCurrency",
					"rate": "UsrPaymentAmountCurrencyRate",
					"generator": "UsrMultiCurrencyEditViewGenerator.generate"
				}
			}
		]/**SCHEMA_DIFF*/
	};
});



Results:

https://prnt.sc/qf723t



Triangle is removed. If you want to still have it - you would need to improve this sample further and check how to make it work.



Regards,

Dmytro

Show all comments
7.15_()
Studio_Creatio_()

I have created a BP with an empty script. With signals start and end.

I save and publish the BP and try then to run the process and an error displays:

 

Can you please tell me what I am doing wrong?

 

Like 1

Like

4 comments

Could you please send the screenshot again? The one you've added seems to be corrupted. 

I think I also have this issue. Error says "Publish the ... process before starting it".

What helps me is "Download packages to the file system". Seems like we have to "download" each time after saving BP but before publishing, otherwise publishing does nothing.

Artur Shelekhov-Balchunas,

 

Yes, this is what I'm getting too, but on a package installed from a zip archive (moving application from dev to test) so I wouldn't have thought we should need to mess around in the config tools at all. Would be useful if someone knew why this happens.

Discovered the issue can be due to other Source Code schemas (C# server code) which fail to compile, which for some reason prevents the Business Process from compiling when it's publishing - I found this by checking the 'Build' log file which can point you to the Source Code schema(s) and the lines causing problems. Would be nice if Creatio told us why the BP publish was failing!

Show all comments
account
7.11
Accounting
Filtering
Filters
7.11_()
Studio_Creatio_()

Hi Team,

We were trying to filter out the account classification. However, we were not able to add the field account classification which is present in the account section to filters. is there a way to add them into the filter so that it can be searched quickly? 

 

 

 

Thank you in advance, Gokul

 

Like 0

Like

2 comments

Hello Gokul,

This field that you are trying to add to the filtration is a detail and detail values cannot be read using 1 level filter. To achieve your task you need to build a complex filter using Academy article here.

Best regards,

Oscar

Thank you for replying Oscar. I tried adding the advanced filter too but the account classification is not coming as an option in the filter

Show all comments