Hi Community,

 

I have created a new workplace in our development system. Now I wanted to transfer this new workplace in our production system. What are the objects I need to consider in Data Binding?

 

Thank you

Like 0

Like

3 comments

Hi Fulgen!



Thank you for your question!



In this case, we would recommend you binding the data with the packages. You may read more on how to bind the data here (the link is clickable) and here (the link is clickable).



Please note that the schemas you ought to bind are: SysSchema & SysWorkplace with your package.

 

Hope this helps.

In case you have any other questions, please, feel free to contact us!



Ivanna.

 

Ivanna Yatsura,

Please, can you explain why we need to bind SysSchema? 

Jahnavi,



Data binding is a process that ensures the developed functionality is transferred correctly between environments. When you bind SysSchema, you are essentially ensuring that the schema (the structure of your data) is correctly transferred and maintained in the new environment



Regards,

Orkhan

Show all comments

Hi Community,

 

I have created a POST API which accepts class object as parameter. Below is my code.

 

 

When I tested my API using Postman, I am getting Object Reference Error.

 

 

Any idea, what's wrong with my code? In academy I cannot find any example of configuration service which accepts class object as parameter.

 

Thank you so much

Like 0

Like

4 comments

Hi Fulgen,

 

It usually means that the problem is somewhere with the UserConnection. Can you please also check the application logs at the moment of issue reproduce? Maybe they contain more information on this topic?

 

Best regards,

Oscar

Fulgen,

You also need to add the [DataContract] attribute to the class you're passing/returning (the ActivityRequest and Activity classes) 

Ryan

Ryan Farley,

 Hi Ryan, Thank you for your reply.

 

I tried to put [DataContract] and [DataMember] attribute on my object classes but still the same error I am getting. 

Fulgen Ninofranco,

Fulgen, I believe your issue is how you're passing the body to the service. Since the method takes a single parameter named "activityRequest" which is an object, the body should look like this:

{
    "activityRequest": {
        "DepartmentId": "the id here",
        "StatusId": "the id here"
    }
}

This way, the parameter of activityRequest will be filled with the object containing the two values of DepartmentId and StatusId. The way you're passing the body in now, it is assuming there are two parameters, one named DepartmentId and one named StatusId, so when you try to use the activityRequest properties the object is null.

Ryan

Show all comments

Hi-

I have a text field that contains a unique number in contacts- and I have a problem where we should only have that number once in our system. I need to prevent my users from creating duplicates when they save new contacts. 

Can I do that in a business rule?

Or what would that look like in a business process?

Like 0

Like

3 comments

In a process, it's really too late for validation. The best way is to accomplish this via programming. You can use the asyncValidate method for this type of task. I have an article here that shows how to use it and even uses a sample scenario that is similar to yours (the sample code in the article shows how to ensure that an opportunity has a unique job number).

https://customerfx.com/article/asynchonous-validation-on-pages-in-creatio-formerly-bpmonline/

You should be able to use the code in the article with minimal changes to accomplish what you're after.

Ryan

Thank Ryan- And I would just paste this into my source code in contacts? Does it matter where in the code I paste it? I can see where I would put in my own info and sub in my object names- but as a non-coder, I want to make sure I add the code in the correct location. 

Heather Mahley,

This would go into the methods block in the page code. Since you're not familiar with writing code, I'd copy and save all the page code first to revert back to if needed. Also, feel free to post the code with the addition here before saving it and I'll take a look to make sure its all in the right place.

Ryan

Show all comments

Hi Community,

I have this situation where I need to update all the AccountAddress records that belong to my Account and have ImdNumerador "0". In order to do that I added the following query:

var updateQuery = Ext.create("Terrasoft.UpdateQuery", {
	rootSchemaName: "AccountAddress"
});
 
var firstFilter = updateQuery.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Account", this.get("Id")); 
 
var secondFilter = updateQuery.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "ImdNumerador", 0); 
 
// Filters will be updated by AND logical operator in query filters collection. 
updateQuery.filters.logicalOperation = Terrasoft.LogicalOperatorType.AND;
 
// Adding created filters to collection. 
updateQuery.filters.add("firstFilter", firstFilter);
updateQuery.filters.add("secondFilter", secondFilter);
 
updateQuery.setParameterValue("Primary", false, this.Terrasoft.DataValueType.BOOLEAN); 
updateQuery.setParameterValue("IsInactive", true, this.Terrasoft.DataValueType.BOOLEAN); 
 
updateQuery.execute(function(result){ 
	if(result.success){
		window.console.log("Update Successfull");
	}
},this);

This query is executed everytime I press a button that I've created in AccountPageV2.js.

When I execute this query I get the error bellow:

I'm not understanding this error because:

  • I don't have any validation or rule for my Country field, so this must be a rule that comes with the default Creatio applications.
  • All the records that I'm trying to update have the country field filled in, so I don't know why I'm getting this.

I would like to know why this is happening and how can I fix it.

Thanks in advance.

 

Best Regards,

Pedro Pinheiro

 

Like 0

Like

1 comments

Hi Pedro,

 

The same code connected to the button on our side worked perfectly:

Try opening all the account addresses records for the account where the update error message is returned, try applying any change to each of those addresses records and check if any of them returns an error (one of them or several records should return an error). Once the error is received you can send a screenshot of such an address record and we can check why the error is received together.

 

Best regards,

Oscar

Show all comments

Changes on attributes dependencies are not being triggered on my detail edit page. Any reason for that ?

regards,

Like 0

Like

1 comments

Ricardo,

 

It's really hard to understand the issue completely without the code of the detail edit page and without the logic that the code represents. Can you please provide us with it?

 

Best regards,

Oscar

Show all comments

Hi Community,

 

In the update guide (https://academy.creatio.com/docs/release/update-guide/update-guide#titl…), there are sets of scripts needs to be executed before proceeding to the upgrade. But in the guide they only specified MSSQL and PostgreSQL scripts they have not given a script for Oracle. Any idea what is the counterpart of the below  scripts in Oracle. Thank you so much.

 

Before updating to version 7.15.3

{

declare @val as varchar(max) = ''

select @val = concat(@val, SchemaName, ', ')

from

(select SysSchema.Name as SchemaName

from SysSchemaContent with (nolock)

inner join SysSchema with(nolock) on SysSchemaContent.SysSchemaId = SysSchema.Id

inner join SysPackage with(nolock) on SysSchema.SysPackageId = SysPackage.Id

where

SysPackage.Maintainer != 'Terrasoft' and

SysSchema.ManagerName in ('EntitySchemaManager', 'PageSchemaManager',

'ProcessSchemaManager', 'ProcessUserTaskSchemaManager', 'SourceCodeSchemaManager') and

(

cast(SysSchemaContent.Content as varchar(max)) like '%Terrasoft.Reports%' or

cast(SysSchemaContent.Content as varchar(max)) like '%ReportSchemaManager%'

)

union

select SysSchema.Name as SchemaName

from SysSchema with(nolock)

inner join SysPackage with(nolock) on SysSchema.SysPackageId = SysPackage.Id

where

SysPackage.Maintainer != 'Terrasoft' and

SysSchema.ManagerName in ('EntitySchemaManager', 'PageSchemaManager',

'ProcessSchemaManager', 'ProcessUserTaskSchemaManager', 'SourceCodeSchemaManager') and

(

cast(SysSchema.MetaData as varchar(max)) like '%Terrasoft.Reports%' or

cast(SysSchema.MetaData as varchar(max)) like '%ReportSchemaManager%'

)

) as contentList

select DB_NAME(), @val as SchemaContent

}

 

Updating to 7.16.1

SELECT SysSchema.Name AS SchemaName FROM SysSchema (NOLOCK)

WHERE SysSchema.Id IN (

SELECT SysSchemaId FROM SysSchemaSource

WHERE SysSchemaId IN (

SELECT

ss.Id

FROM SysSchema ss WITH (NOLOCK)

INNER JOIN SysPackage sp WITH (NOLOCK) ON ss.SysPackageId = sp.Id

WHERE sp.Name NOT IN ('Base', 'ProcessDesigner', 'NUI', 'SSP')

AND sp.Maintainer != 'Terrasoft'

AND ss.ManagerName NOT IN ('ClientUnitSchemaManager', 'DcmSchemaManager', 'PageSchemaManager')

)

AND (Source LIKE '%MailBe%' OR (Source like '%SmtpClient%' AND Source like '%Terrasoft.Mail%'))

)

 

Like 0

Like

1 comments

Hello Fulgen,

 

Our apologies for the delay in responding!

 

The required scripts for Oracle are ready.

  • The Before updating to version 7.15.3 script is available below. It will be added to the update guide shortly.
  • begin
    	declare
    		v_val VARCHAR2(4000) := '';
    	begin
    		EXECUTE IMMEDIATE 'CREATE OR REPLACE FUNCTION blob_to_clob (blob_in IN BLOB)
    		RETURN CLOB
    		AS
    			 v_clob CLOB;
    			 v_varchar VARCHAR2(32767);
    			 v_start PLS_INTEGER := 1;
    			 v_buffer PLS_INTEGER := 32767;
    		BEGIN
    			IF blob_in IS NULL THEN
    				RETURN NULL;
    			END IF;
    			 DBMS_LOB.CREATETEMPORARY(v_clob, TRUE);
     
    			 FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(blob_in) / v_buffer)
    			 LOOP
     
    				v_varchar := UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(blob_in, v_buffer, v_start));
    				DBMS_LOB.WRITEAPPEND(v_clob, LENGTH(v_varchar), v_varchar);
    				v_start := v_start + v_buffer;
    			 END LOOP;
    			RETURN v_clob;
    		END blob_to_clob;';
     
    		select v_val = concat(concat(v_val, ','), "SchemaName") into v_val
    		from(
    			select "SysSchema"."Name" as "SchemaName"
    			from "SysSchemaContent"
    			inner join "SysSchema" on "SysSchemaContent"."SysSchemaId" = "SysSchema"."Id"
    			inner join "SysPackage" on "SysSchema"."SysPackageId" = "SysPackage"."Id"
    			where
    				"SysPackage"."Maintainer" != 'Terrasoft' and
    				"SysSchema"."ManagerName" in (
    					'EntitySchemaManager',
    					'PageSchemaManager',
    					'ProcessSchemaManager',
    					'ProcessUserTaskSchemaManager',
    					'SourceCodeSchemaManager') and
    				(blob_to_clob("SysSchemaContent"."Content") LIKE '%Terrasoft.Reports%' or
    				 blob_to_clob("SysSchemaContent"."Content") LIKE '%ReportSchemaManager%')
    		union
    		select "SysSchema"."Name" as "SchemaName"
    		from "SysSchema"
    		inner join "SysPackage" on "SysSchema"."SysPackageId" = "SysPackage"."Id"
    		where
    			"SysPackage"."Maintainer" != 'Terrasoft' and
    			"SysSchema"."ManagerName" in (
    				'EntitySchemaManager',
    				'PageSchemaManager',
    				'ProcessSchemaManager',
    				'ProcessUserTaskSchemaManager',
    				'SourceCodeSchemaManager') and
    			(blob_to_clob("SysSchema"."MetaData") LIKE '%Terrasoft.Reports%' or
    			 blob_to_clob("SysSchema"."MetaData") LIKE '%ReportSchemaManager%')
    		);
    	end;
    end;

     

  • The Updating to 7.16.1 and 7.16.2 script is available in the Academy article.

Best regards, 

Olga. 

Show all comments

I've seen this post,

https://community.creatio.com/articles/how-can-i-change-detail-caption-depending-page

Is it possible to use the same logic to change the detail columns captions too (depending on the page) ?

(binding the detail column caption to a property works when I open a detail row for edition, but we need it to happen when the detail is shown on the object edit page)

Like 0

Like

1 comments

Hi Ricardo,

 

The logic that forms the name of the columns in the Grid is stored in the SysPorfileData table and the actual ObjectData column value is formed using base addProfileColumns method (that is a part of Profile that consists of tiledConfig (config for tiled columns display) and listedConfig (listed columns display config)). Modifying the base logic will be hard (either overriding addProfileColumns and modifying configs or creating a trigger on the database level that will update the SysPorfileData table for the detail grid setup). We don't recommend modifying the logic and recommend using multiple edit pages and setup detail column names separately in different pages.

 

Best regards,

Oscar

Show all comments

Is it possible to reorder the analytics titles in the section analytics data view page?

Like 0

Like

1 comments
Best reply

Dear Ricardo,

 

Those titles are ordered by alphabet. If you need to set some of them in a specific order you can add dashboards to favorite or number them.

 

Best regards,

Angela

Dear Ricardo,

 

Those titles are ordered by alphabet. If you need to set some of them in a specific order you can add dashboards to favorite or number them.

 

Best regards,

Angela

Show all comments

Hello,

 

I'm extending BaseSchemaModuleV2 follow example of CenterNotificationModule, but it's missing the messages GetHistoryState and ReplaceHistoryState (already define in BaseSchemaModuleV2). I found that CenterNotificationModule has Parent = BaseSchemaModuleV2, but I cannot find a way to add that Parent to my module.

Like 0

Like

3 comments

Hello,

 

Here is an example of extending the modules:

 

define("UsrTestModuleV2", ["TestModuleV2"],
function() {
    Ext.define("Terrasoft.UsrTestModuleV2", {
        extend: "Terrasoft.TestModuleV2",
         
        // extend functions in TestModuleV2
     
    });
});

 

In the logic above the "UsrTestModuleV2" will use all the logic of "TestModuleV2" and also extended logic for "TestModuleV2" specified in the "UsrTestModuleV2". Also the parent is already added to "CenterNotificationModule" - it is done in this part of the schema definition:

 

 define("CenterNotificationModule", ["BaseSchemaModuleV2"]

 

so BaseSchemaModuleV2 is a dependency for the "CenterNotificationModule".

 

Best regards,

Oscar

No, I mean this parent:

The messages are inherited via metadata inheritance:

 

This is the error I get when I loaded the test module:

 

 

Basically, I can manual add those messages into the test module. However, if the BaseSchemaModuleV2 is updated with new messages, the error may happen again. Therefore, inheriting those metadata is the best way to make sure that the test module is forward-compatible. The CenterNotificationModule metadata exported shows that it inherited those metadata instead of redefining them. But it seems that I cannot do that from the developer console, although the built-in package already had ability to do that.

Is there any update?

Show all comments

We need to add a custom button to the section analytical view page, which will trigger a business process.

 

 

Is it possible ?

Like 0

Like

3 comments

 This container you are referring to is supposed to store DataViews in it (please take a look at the getDefaultDataViews method from the BaseDataView module). It is not supposed to store buttons in it.

 

It is better to add the button to a separate container created in the FiltersContainer container and bind process execution to this button. As an example I've added the button to the contact section analytics data view:

define("ContactSectionV2", ["ProcessModuleUtilities"],
	function(ProcessModuleUtilities) {
		return {
			entitySchemaName: "Contact",
			attributes: {},
			messages: {},
			methods: {
				runCustomProcess: function() {
					var config = {
						sysProcessName: "UsrProcess_eedcaa6"
					};
					ProcessModuleUtilities.executeProcess(config);
				}
			},
			diff: /**SCHEMA_DIFF*/ [
				{
					"operation": "insert",
					"name": "CustomButtonContainer",
					"parentName": "FiltersContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.CONTAINER,
						"items": []
 
				},
				{
					"operation":"insert",
					"name": "TestProcessButton",
					"parentName": "CustomButtonContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"caption": {bindTo: "Resources.Strings.CustomButtonCaption"},
						"click": {bindTo: "runCustomProcess"},
						"style": Terrasoft.controls.ButtonEnums.style.GREEN
					}
				}
				] /**SCHEMA_DIFF*/
		};
	});

And connected custom process execution when clicking the button. As a result the button appeared on the page as expected:

And a custom process was executed upon clicking it.

 

Best regards,

Oscar

Oleg Drobina,

Hi Oleg

 

Couple of questions. If I just wanted this button to appear on List View of the Section Page rather than the Analytics what would need to change?

 

Also does this code create the custom button here or does that need to be created elsewhere and it is just referenced here?

 

thanks

Rob Watson,

 

Hello Rob,

 

For the first question: I used the FiltersContainer container as a parent for the button, but it has the logic that it's hidden in the list view and is displayed only in analytics view (logic of the saveFiltersContainersVisibility method). In this case logic like this should be used:

methods: {
...
loadAnalyticsDataView: function() {
					this.set("IsCustomButtonContainerVisible", false);
					this.callParent(arguments);
				},
 
				loadGridDataView: function() {
					this.set("IsCustomButtonContainerVisible", true);
					this.callParent(arguments);
				},
...
 
diff: [
...
{
					"operation": "insert",
					"name": "CustomButtonContainer",
					"parentName": "QuickFilterModuleContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.CONTAINER,
						"visible": { "bindTo": "IsCustomButtonContainerVisible" },
						"items": []
					}
				},
				{
					"operation":"insert",
					"name": "TestProcessButton",
					"parentName": "CustomButtonContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"caption": {bindTo: "Resources.Strings.CustomButtonCaption"},
						"click": {bindTo: "runCustomProcess"},
						"style": Terrasoft.controls.ButtonEnums.style.GREEN
					}
				}
...
]

We change a parent item for the "CustomButtonContainer" to "QuickFilterModuleContainer". As a result button will be visible only in list view and will be hidden in analytics view.

 

As for the second quesion: the button is created in the schema diff directly (container + button itself).

Show all comments