Hi, all!

 

Could anyone clarify, do user's access rights depend on the order in which organizational roles are added on the detail of the user's form? I mean is it important if I add organizational roles for one user in the order

Role1

Role2

Role 3

and for another user in the order 

Role 2

Role 1

Role 3

 

And give them the same functional role (only one)?

 

I'm asking because now those two users can see different amount of the records of the same object and the only difference in their rights is that order.

Like 0

Like

2 comments

Hello!

 

Please note that order of organizational roles in the details does not affect anything. So do not pay attention to it.

In case users see different amount of the records, please recheck object permissions and make sure that they are granted for both users.

Hi!

Please use the Prefix for object name (SchemaNamePrefix) system setting to set up the schema prefix:
https://academy.creatio.com/docs/8.x/no-code-customization/customizatio…

Show all comments

Hi Team,

I'm trying to call hierarchical copying from the front-end of my Creatio application, but I'm having some trouble. I've read in the Creatio documentation that I should use the callService() method, but I'm not sure how to use it correctly.

I saw an example in the documentation that uses the "ProductBankCustomerJourney" package and the "ProductConditionDetailV2" schema, but I can't seem to find these in my application.

Can anyone provide me with some guidance on how to call hierarchical copying from the front-end of my Creatio application? Any help or advice would be greatly appreciated.

Thanks in advance!

Like 0

Like

1 comments

Hello,

 

This package is a part of the bank-sales-bank-customer-journey installation files so probably that's why you cannot find it in your app. It would be easier to get such a demo or onsite installation files and review the logic there. Here are the methods from the ProductConditionDetailV2 schema:

getCopyRecordConfig: function() {
                return {
                    serviceName: "HierarchyDataCopyingService",
                    methodName: "CreateRecordCopy",
                    data: {
                        schemaName: this.entitySchemaName,
                        recordId: this.$ActiveRow
                    },
                    scope: this
                };
            },
...
copyRecordServiceCallback: function(response) {
                response = response || {};
                response = response.CreateRecordCopyResult || {};
                this.hideBodyMask();
                if (!response.success) {
                    var errorMessage = this.extractErrorMessage(response);
                    this.showInformationDialog(errorMessage);
                    return;
                }
                const copiedRecordId = response.recordId;
                this.openCard(configurationEnums.CardStateV2.COPY, this.Terrasoft.GUID_EMPTY, copiedRecordId);
            },
...
validateConditionsDueDateCallback: function(result) {
                if (result.success) {
                    this.callCopyRecordService();
                    return;
                }
                this.showInformationDialog(result.message);
            },
....
copyRecord: function() {
                this.isCanCopyRecord(function(isCan) {
                    if (!isCan) {
                        var denyMessage = this.get("Resources.Strings.RecordRightsErrorMessage");
                        this.showInformationDialog(denyMessage);
                        return;
                    }
                    this.validateConditionsDueDate(this.validateConditionsDueDateCallback, this);
                }, this);
            },
 
....
 
callCopyRecordService: function() {
                this.showBodyMask();
                var config = this.getCopyRecordConfig();
                this.callService(config, this.copyRecordServiceCallback, this);
            },

The chain is: copyRecord -> validateConditionsDueDate -> validateConditionsDueDateCallback -> callCopyRecordService -> getCopyRecordConfig -> copyRecordServiceCallback.

 

To call the service the config is used:

serviceName: "HierarchyDataCopyingService",
					methodName: "CreateRecordCopy",
					data: {
						schemaName: this.entitySchemaName,
						recordId: this.$ActiveRow
					},

and the actual call is performed:

this.callService(config, this.copyRecordServiceCallback, this);

callback function determines what should be done once the service response is received.

Show all comments