Hi Guys,

 

Two different users can edit a record at a same time in Creatio, how to prevent it?



Example :- User ABC and User XYZ can edit contact 123 at the same time. 

 

Thanks.

Like 1

Like

4 comments

Hello,

 

Please note that unfortunately in such system with joined access there is no way to implement this logic. If a record is available to more than 1 user, they will all be able to access it at the same time and make changes to it at the same time. They can save the record one by one, all the changes will be applied, but the changes made by the last user to save the record will stay.

Hi Mira,



If  user1 is editing a record, and user2 should not be able to edit the same record, and system should show error message saying "user1 is editing this record" and prevent user2 from editing the record. How to implement this functionality? 

Nishit Singla,

 

As ws mentioned above, this kind of logic cannot be implemented even through means of development due to specifics of the system. While a user is making changes to the fields, before this user saves the record, no actual changes are being made. All the changes are only displayed on their side of UI, but before the actual "Save" these changes aren't "registered" in the system in any way, they don;t actually takeplace, therefore this logic cannot be implemented.

If there's any chance for this to be implemented in the future, it would be most welcome :)

Show all comments

Hello,



We try to use Locking edit page fields tool to lock a page with specific condition. 

When user opens the page from a Section (e.g. Orders), it works correctly - all fields and details are locked.

But when user opens the same page from a detail (e.g. Account/History/Orders) - all fields and details are not locked, so DisableControlsGenerator doesn't work



Does anyone has solution or idea how to fix this?



Thank you!

Like 2

Like

7 comments
Best reply

Try below code and let me know if it works. 

 

attributes: {

            "IsModelItemsEnabled": {

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": true

            },



onEntityInitialized: function() {

this.callParent(arguments);

                this.set("IsModelItemsEnabled", false);

            },

 

diff: /**SCHEMA_DIFF*/[

             {

                 "operation": "merge",

                "name": "CardContentWrapper",

                 "values": {

                     "generator": "DisableControlsGenerator.generatePartial"

                 }

             },

Hello,

 

I've run into a small test by displaying the configuration items detail on the contact page and by applying fields locking on the configuration item page. When opening the configuration item from the detail located on the contact page the fields are locked. So the issue is that the conditions that you use to lock the page are not working as they should.

Oleg Drobina,

We use no condition for the test on ContractPageV2:

 

        attributes: {

             "IsModelItemsEnabled": {

                 "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                 "value": false

             },

 

    diff: /**SCHEMA_DIFF*/[

             {

                 "operation": "merge",

                "name": "CardContentWrapper",

                 "values": {

                     "generator": "DisableControlsGenerator.generatePartial"

                 }

             },

 

I've tested on demo environment with 3 sections: Contract, Document and custom Test section. The same result for all of them

Try below code and let me know if it works. 

 

attributes: {

            "IsModelItemsEnabled": {

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": true

            },



onEntityInitialized: function() {

this.callParent(arguments);

                this.set("IsModelItemsEnabled", false);

            },

 

diff: /**SCHEMA_DIFF*/[

             {

                 "operation": "merge",

                "name": "CardContentWrapper",

                 "values": {

                     "generator": "DisableControlsGenerator.generatePartial"

                 }

             },

Vladimir Sokolov,

 

I was also able to reproduce it for Contracts, will contact our R&D department for clarifications and return to you once I receive any feedback from them.

Nishit Singla,

Thank you! This works

Oleg Drobina,

Besides, I've found, that this doesn't lock 'Connected to' fields in Document:

Show all comments

Hi community,

I want to implement the similar functionality in my custom package with custom detail.

How to populate those templates marked in the circle.

Thanks in advance.

Like 1

Like

1 comments

Hello,

 

The logic of this list creation is located in the "SupplyPaymentDetailV2" module in the "initItemTemplates" method that is triggered by the "init" method in the same "SupplyPaymentDetailV2" module. This formed list of templates is than connected to the "AddTypedRecordButton" button in the "controlConfig" property:

{
						"operation": "merge",
						"name": "AddTypedRecordButton",
						"values": {
							"caption": "",
							"click": {"bindTo": "onAddButtonClick"},
							"controlConfig": {"menu": {"items": {"bindTo": "ItemTemplates"}}}
						}
					},

So the logic of populating the list of templates is located in the "initItemTemplates" method that should be debugged further.

Show all comments

Hello Creatio Community,

I have made the Activity participant detail (Activites section) as an editable list.

When I add a new record and click on the added row ( the active row doesnt behave normally) as editable lists in other sections. I think is probably sort of bug of the system, because i have tried in fresh installations and the same thing happens.

 

I overcome this by refreshing the page so that the added row behaves normaly.

I manage to refresh the page by sending a message from a business process to the Front-End and subscribe to the message. But i refresh the whole Activity (entity), i want to refresh only the Participant detail.

This snippet is implemented in ActivityPageV2

			init: function() {
				this.callParent(arguments);
				// register our onProcessMessageReceived function to get messages from the server
				Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, this.onProcessMessageReceived, this);
			},
			onProcessMessageReceived: function(scope, message) {
				debugger;
				var sender = message && message.Header.Sender;
					if (sender === "RefreshDetailActivityParticipantFromBP") { //"SMRefreshPaged"
					this.reloadEntity();
				}
			}

How can i manage to refresh only the Participant detail list?

I have tried also this.reloadGridData() and this.updateDetail({reloadAll: true}); without success.

Like 0

Like

3 comments

this.reloadGridData()  is not defined in the ActivityPageV2. (console)

I think that the proper solution involves using the this.reloadGridData()  method ? Should i just add the :

mixins: {
			GridUtilities: "Terrasoft.GridUtilities"
		}

in the ActivityPageV2 ?

Any updates on this Creatio team ?

Sasori Oshigaki,

this.updateDetail({ detail: "NameOfDetail" });

You can find the "NameOfDetail" value to use by looking at the details section of the page code for your detail (it's not the name of the detail schema, but the name or Id it gave it when it added it to the page). The reloadGridData function only works from within the detail schema code itself. 

 

Show all comments

In account section page, creating relationship with other companies in the "CONNECTED TO" tab" the account selection doesn't use the account popup lookup search.

How can I use the same account selection popup available in other standard account lookup fields? 

Like 0

Like

0 comments
Show all comments

Hi Team,

 

Please provide me with an example for how we can display an Information dialog box after we change the value in a lookup and refresh the page automatically after lookup value change.

 

 

Like 0

Like

1 comments

Hi Sarika,

 

Two examples in one: refresh the page in case the account selected in the lookup column on the page has the "167161603" name (the lookup column is a custom one added to the page) and display a popup stating that the page was refreshed:

handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "crt.HandleViewModelAttributeChangeRequest",
				handler: async (request, next) => {
					if (request.attributeName === 'LookupAttribute_upoxk3v' && request.value.displayValue == '167161603') {
						const handlerChain = sdk.HandlerChainService.instance;
							await handlerChain.process({
								type: 'crt.LoadDataRequest',
								$context: request.$context,
								config: {
									loadType: "reload"
								},
								dataSourceName: "PDS"
							});
						Terrasoft.showInformation("Refreshed!", this);
						return next?.handle(request);
					}
				}
			}
		]/**SCHEMA_HANDLERS*/,

LookupAttribute_upoxk3v should be replaced with the attribute name from the attributes property of the viewModelConfig:

viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{
			"attributes": {
				"UsrName": {
					"modelConfig": {
						"path": "PDS.UsrName"
					}
				},
				"Id": {
					"modelConfig": {
						"path": "PDS.Id"
					}
				},
				"LookupAttribute_upoxk3v": {
					"modelConfig": {
						"path": "PDS.UsrAccount"
					}
				}
			}
		}/**SCHEMA_VIEW_MODEL_CONFIG*/,

To find out which attribute is needed you need to take a look at the control of the page element in the viewConfigDiff:

{
				"operation": "insert",
				"name": "ComboBox_i6riofn",
				"values": {
					"layoutConfig": {
						"column": 1,
						"row": 1,
						"colSpan": 1,
						"rowSpan": 1
					},
					"type": "crt.ComboBox",
					"loading": false,
					"control": "$LookupAttribute_upoxk3v",
					"label": "$Resources.Strings.LookupAttribute_upoxk3v",
					"labelPosition": "auto",
					"listActions": [],
					"showValueAsLink": true
				},
				"parentName": "LeftAreaContainer",
				"propertyName": "items",
				"index": 0
			},

Also don't forget to add "@creatio/sdk" into the dependencies. 

Show all comments

We have an implementation of saving data in the "History" of Contacts, and we use the HttpWebRequest method like this POST. However, now every time we try to upload a file into the History email it returns this  Error: 'The remote server returned an error: (400) Incorrect Request.'.

private static bool TransferFile(Guid fileRecordId, string columnName, byte[] file) {
            log.Debug("[START] Transfer file");
            try {
                string requestUri = ServerUriUsr + "ActivityFileCollection(guid'" + fileRecordId.ToString() + "')/" + columnName;
                HttpWebRequest request = RequestHelper.BuildRequest(requestUri, HttpMethod.Put);
                request.Accept = "application/octet-stream,application/json;odata=verbose";
                request.ContentType = "multipart/form-data;boundary=+++++";
                // Recording the xml message to the request stream.
                using (Stream requestStream = request.GetRequestStream())
                {
                    requestStream.Write(file, 0, file.Length);
                }
                // Receiving a response from the service regarding the operation implementation result.
                using (WebResponse response = request.GetResponse())
                {
                    if (((HttpWebResponse)response).StatusCode == HttpStatusCode.Created)
                    {
                        // Processing the operation implementation result.
                        response.Close();
                        log.Debug("[END] Transfer file (Successful)");
                        return true;
                    }
                }
            }
            catch (WebException ex) {
                if (ex.Response is null)
                    log.Error($"TransferFile function error: {ex.Message}");
                else
                    log.Error($"TransferFile function error: {new StreamReader(ex.Response.GetResponseStream()).ReadToEnd()}");
                throw;
            }
            catch (Exception ex) {
                log.Error($"TransferFile function error: {ex.Message}");
                throw;
            }
 
            return false;
        }

The problem only occurs when I try to upload a .docx or .xlsx file

Like 0

Like

2 comments

Have you checked failed IIS requests logs and the applicaiton logs for more information on the invalid request? What was the result of the check?

Oleg Drobina,

I ended up doing more tests and the problem only occurs when it is a .docx and .xlsx type file.

When it is PDF or images it works normally without any problems.

Show all comments

Hello,

I have a requirement to add Aspose.pdf Connector in Creatio. I have installed it and is visible in Application Hub, can anyone provide a document/ step of how to use the Aspose.pdf Connector in the Creatio for my Custom Package.

I have a requirement to show some fields with data in PDF form using a Preview button.

 

 

Like 0

Like

4 comments
Best reply

Hello Smit, 

 

We would appreciate it if you can provide more details on your business requirements. Your described behavior can also be implemented via the business process, which will be triggered by a button click and will return an autogenerated page with values of the fields that you can forward to your printable

 

Best Regards, 

Hello Smit, 

 

We would appreciate it if you can provide more details on your business requirements. Your described behavior can also be implemented via the business process, which will be triggered by a button click and will return an autogenerated page with values of the fields that you can forward to your printable

 

Best Regards, 

Hello Ihor,

 

Thanks for the idea of using Printable Report.

After creating printable report, after clicking on print button in the section it displays a Dialog box which is saying "Please fill in the system setting for converting to PDF" can you please help us on which system settings need to be filled?

 

Regards,

Smit Suthar

 

Hello Smit, 

 

Can you please clarify if the settings mentioned in the Installation tab under "Guides and manuals" were filled in? - https://marketplace.creatio.com/app/asposepdf-connector-creatio

 

Best Regards, 

Ihor

 Hey Ihor,

Thanks now everything is working fine. 

Show all comments

I need to do a custom button implementation, which will download the grid from the detail with all the data that is in the grid, like the similar function of the "PRINT" button.

 

Like 0

Like

1 comments

Hi Gabriel Cassimiro,



Please feel to explore the printables in the below thread.

It is explained for Portal users and in the same way, functionality has to be implemented in your custom section (Please be informed to debug the modules explained in the article and use it accordingly for your functionality).



https://community.creatio.com/articles/how-show-printables-print-button-printables-portal-user

 

 

BR,

Bhoobalan Palanivelu.

Show all comments

I made a post earlier that helped me with a section grid but I currently need to add a custom button that should be on every grid line of a detail that was added in Orders.

As an example in the image above, you should have a custom button on all rows of the Detail grid.

Like 0

Like

5 comments

Hi Gabriel,



Have you tried to implement the logic in the corresponding detail Schema? https://community.creatio.com/questions/add-custom-button-all-rows. If implemented, could you please post the results after implementing them in your detail schema?





BR,

Bhoobalan Palanivelu.

Yes, it was from this post that I tried, but for the Detail that I put in the printout, I couldn't get it to work with the Detail grid.

Gabriel Cassimiro,

 

Could you please share with us the current implementation that you are using from the previous post so we can investigate how can it be resolved?

 

Best regards,

Dariy

Dariy Pavlyk,

I made the attempt to implement as in this post here: https://community.creatio.com/questions/add-custom-button-all-rows But for what I would like in specific it doesn't work.

Gabriel Cassimiro,

 

As Dariy Pavlyk mentioned, please share with us what has been implemented. The previously shared article is for the section and please share how did you implement in your scenario (the schemas you used, the implementation you did) With that further investigation could be made.





BR,

Bhoobalan Palanivelu.

 

Show all comments