Hello Creatio Community!

I want to change the text that appears in this pop-up, "Detail Product Terms is not filled". This pop-up appears when i click save and one of the product terms is not filled.

I have also seen in the SysTranslation table and i havent found it.

Like 0

Like

3 comments

Hello Petrika,

 

Unfortunately, It is not possible to change the text in the error message. The problem here is that the schema that defines it is very hardcoded in the application core. It is not possible to replace and modify it. 



Best regards,

Bogdan

Thank you Bogdan ! Best regards

Petrika,

 

Assuming the field is a text field, you can try the following custom approach in client page schema.

 

1. Make the field not required in the section wizard.

2. In the client page schema, add the following code in the methods:

methods: {
	// Redefining the base method initiating custom validators.
	setValidationConfig: function() {
		this.callParent(arguments);
		this.addColumnValidator("UsrProductTerms", this.ProductTermsValidator);
	},
	ProductTermsValidator: function(){
		var invalidMessage ="";
		var ProductTerms = this.get("UsrProductTerms");
		if(ProductTerms.length != 0){
			invalidMessage ="";
		}else{
			invalidMessage = "Product Term is required in order to proceed"; //Put your custom message
		}
		return {
			invalidMessage : invalidMessage
		};
	},
},

Now you can see your custom validation message. Similar approach can also be used for fields of type Lookup, Date, Integer etc.

 

Regards,

Sourav Kumar Samal

Show all comments

Hello Community,

 

There are many use cases where we need to change the data type of a column. We have observed the following behavior wrt data type changes and want to understand why this happens.



DB - MS SQL



Behavior #1

Say a column has been created as String(250) and published. Changing it to String(50) via the Object designer and re-publishing it does not change the data type at the data base level - even though it reflects correctly in the Package (We also verified that there is no data in the DB which exceeds 50 characters. So technically, it can be downgraded to 50 characters without loss of data). We are forced to alter the column at the database level to actually downgrade it to String(50).



Behavior #2

On the flipside, a data type change from String to Int does work. Additionally, it downgrades the column from NOT NULL to NULLable type in the Database when the String to Int conversion happens.

  1. Can someone string together the above 2 behaviors and why one happens and the other doesn't?
  2. Is there knowledge within the community as to what data type changes work and what do not? If yes, Pls share your experiences.

Note - I am aware that the earlier column can be dropped and a new column with the new data type be created. But this is not practical, if we want to retain the same name. 

Like 0

Like

4 comments

Hello,

 

Hope you're doing well.

 

We tried to reproduce the behavior you have described for different types of DB (PostgreSQL and MSSQL) in two ways:

1. Create a column via Page Designer.

2. Create the column in Object Designer.

 

At first, we have set the string length 250 for the 1st column, then changed it to 50 in the Object Designer and published the object:

 

 

 

As a result we could see that the data type has been changed from varchar(250) to varchar(50):

 

 

Then we have repeated the same actions for another test column (added via Object designer) and result was the same:

 

 

 

 

 

That's why it would be really helpful if you could confirm if we were doing the reproducing correctly (maybe we should use another version or another product). Also, we can provide you with a fresh installation files so you can try to re-check it from your side once again (for that just contact our support team via this email: support@creatio.com).

 

About the second question: in general, we do not recommend to change field types. The system can transfer data type from one char to another when you need to change the length of the field. But it may behave unpredictably when the type is changed from one object to another.

Alos you can find some addtional information about data types in the links below:

 

Best regards,

Roman

Roman Rak,

Hi Roman, Appreciate your effort in trying to reproduce this.



Your steps does look right - 

1. Create as 250 in Object designer. Publish and check if the DB shows nvarchar(250).

2. Change to 50 in Object designer. Publish and check if the DB has changed to nvarchar(50).



I have verified this on 2 Creatio versions - 7.15.2 Studio and 7.16.3 CustomerCenter (Both MS SQL). Is is possible that this got fixed/changed in the latest 7.17 release?? Il also reach out to Creatio support ato replicate this in the latest release.

M Shrikanth,

 

As for your question - no, it was not changed in the latest versions.



Best Regards,

Ivanna Yatsura

Roman Rak,



Hi Roman. Checked this use case once again. The behavior I have stated in my question is correct. I have used a on-premises Creatio sales v7.17 on MSSQL. The datatype does change if you increase the length (Eg 50 to 250) but not from 250 to 50.



Have you checked this on an on-premises or trial instance??

Show all comments



Hi community!



Contact has a colmn called "ContactPhoto" which returns System.Byte[].

I need this to be a string for a view that I'm creating.



this is what I tried:

 

SELECT Id, ContactPhoto,
	cast('' as xml).value('xs:base64Binary(sql:column("ct.ContactPhoto"))', 
	'varchar(max)') AS UsrContactPhoto
	FROM contact ct

which returns me an empty string:

https://prnt.sc/po1qe8

 

Any idea how I can convert it?



Thanks in advance!

File attachments
Like 0

Like

0 comments
Show all comments

To change a String into an Integer, the Int32 C# library must used, for example,

Int32.Parse([#MyString#])

Note that if the string is not a number, the process will error.  Int32.TryParse is not available in functions to check that the string parses to a number.

This is handy for ordering lookups without changing advanced settings by entering the order of a lookup in the Description field. Multiple levels of ordering can be easily combined.  For example, details with and order could be sorted with a grouping characteristic:

(100*Int32.Parse([#GroupOrder#]))+Int32.Parse([#DetailOrder#])
Like 1

Like

Share

0 comments
Show all comments

How do I test if a String Parameter in a process has not been filled in using a Formula?  For example, the following are not working because they do not evaluate to true when the parameter is not filled in:

[#MyStringParameter#]==""
 
[#MyStringParameter#]==String.Empty

Is there a function for String length?

Like 0

Like

2 comments

I've used the following: 

string.IsNullOrEmpty([#MyStringParameter#])

However, I believe I've used what you're using as well (but might have wrapped it in parentheses)

Ryan Farley,

String.IsNullOrEmpty([#MyStringParameter#]) works.  Thanks!

Show all comments

How to trigger event in string text field.

 

Example: I want to open document lookup when there is changes in the value of text field 

Like 0

Like

1 comments

Dear Fulgen,

See this example to find out how to create a method that watch for changes in some fields. In simple words, you will need creating an attribute, that will have dependencies on needed columns and fires a method. You can see many examples in the configuration like this one:

attributes: {

                    "Status": {

                        "lookupListConfig": {

                            "orders": [{columnPath: "Position"}]

                        },

                        "dependencies": [

                            {

                                "columns": ["Status"],

                                "methodName": "onOrderStatusChanged"

                            }

                        ]

                    },

...

where:

"columns": ["Status"] - list of columns where you watch for changes

"methodName": "onOrderStatusChanged" - method that fires when "Status" column is changed

Show all comments

I have a string text field which I want to do is open a document lookup whenever I hit [Enter] on it.

Like 0

Like

1 comments

Dear Fulgen,

I have answered here how to watch for changes in a field. Pressing Enter fires the changing event. If you need more complex logic, you may need to create your own controls. Follow this link to see how.

Show all comments