WordPress_Plugin
Sales_Creatio
We are getting the following error message when trying to use the plugin: 

The server encountered an error processing the request. The exception message is 'Owner field must be filled in'. See server logs for more details. The exception stack trace is:

at Terrasoft.Configuration.FileImport.FileImporter.ValidateColumnsMapping(ImportParameters parameters) at Terrasoft.Configuration.FileImport.FileImporter.Import(ImportParameters parameters) at Terrasoft.Configuration.WebFormHandler.HandleForm(FormData formData) at Terrasoft.Configuration.GeneratedWebFormService.GeneratedObjectWebFormService.SaveWebFormObjectData(FormData formData) at SyncInvokeSaveWebFormObjectData(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

[raw] => HTTP/1.1 400 Bad Request Cache-Control: private Content-Type: text/html Server: Microsoft-IIS/8.5 Set-Cookie: BPMSESSIONID=mqd0tpbejjhecrk5m5pz4fwy; path=/0; secure; HttpOnly Access-Control-Allow-Origin: * X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff Date: Mon, 20 Apr 2020 19:31:38 GMT Connection: close Content-Length: 2724
Like 0

Like

2 comments

Hi Teesha,



Could you please describe the steps to reproduce the issue?



Thank you.

Hi Bohdan Zdor,

 

I used these steps to set it up: http://agiliztech.com/2019/07/23/creatio-wordpress-landing-page-integration/ 

 

When I run a test, I receive the error above. 

Show all comments

We have a PowerBI report connecting to Creatio through OData, with a data source refresh every day at 7am MST. Every single day, it fails with this message.

---------------------------------------------------------------------------------------------------------------

Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.

{"error":{"code":"ModelRefresh_ShortMessage_ProcessingError","pbi.error":{"code":"ModelRefresh_ShortMessage_ProcessingError","parameters":{},"details":[{"code":"Message","detail":{"type":1,"value":"OData: Request failed: The maximum number of redirections allowed was reached. (Found)"}}],"exceptionCulprit":1}}} Table: KwlBusinessLineCollection.

Then our Administrator goes into PowerBI and resubmits the refresh manually, and it works.

----------------------------------------------------------------------------------------------------------------

Has anyone encountered this or know the cause?

Thanks,

Like 0

Like

4 comments

Dear Heather, 

Please make sure that the flag LogSessionForSessionLessRequest is set to false in web.config in the root folder in installation files of your site. 

Dennis Hudson,

Is that something I have access to through the development console?

Heather,

 

If you have an on-site application you can find the web config file in the installation files. If you have a cloud application, you can request this information from the support team (support@creatio.com).

Heather,

 Did you manage to connect using Odata?

Show all comments
#mobileapp
stage
Leads
7.15
Sales_Creatio

Hi community, 

Is there any way to have lead stages sorted same way as they are in the web page ? I want them to be sorted same way as they show up in lead web page. 

Thank you

Like 0

Like

3 comments

Sanae ADRAR,

You can include the stage number in the displayed columns and click on stage number column to sort it

KrishnaPrasad,

Okay found it. Thank you !!!

Show all comments

Dear Mates,

 

I just wanted to check, How to create HTML pages in Creatio Interface ?

 

Thanks.

 

 

Like 0

Like

2 comments

Hello Nageswara,

 

Creatio platform doesn't allow to create HTML pages inside of it, however if you want to add the website reference into the Creatio app you can either use the "Website" dashboard (described here) or imbed your website using IFrames (described here).

 

Best regards,

Oscar

Oscar

 

Thank you.

Show all comments
Run Process
7.15
Sales_Creatio

Dear mates,

Since the Creatio version update, i've an opportunity process which does not open the order pageanymore.

When an opportunity is closed won, it launch a process which create a new order and must open it.

i can not find why the order is not open by the process. the order is well created with all the informations requested, but the order page is not opened

 

when i look into the Process log, everything is ok :

Does anybody have a suggestion to resolve this issue ?

Thank you,

Nicolas

Like 0

Like

2 comments
Best reply

LÉZORAY Nicolas,

Remove checkBox from "Run following elements in the background" on your start 

Well the process created me an activity name "Open Order", but it did not open the order.

How can i directly open the order with the process ?

LÉZORAY Nicolas,

Remove checkBox from "Run following elements in the background" on your start 

Show all comments
file
detail
attachment
7.15
Sales_Creatio

Hello,

I have added a number column to the OpportunityFile object, and I have two separate File details for uploading to the same Opportunity. I would like each detail so set my new column to a different value (numbers 1 or 2). How can this be achieved?

Like 0

Like

1 comments

Hello Jordan,

 

There should be two different schemas for these two details that are using the same object. To achieve your task you need to add this method two both your details schemas:

 

methods: {

            save: function() {

                this.callParent(arguments);

                this.setInteger();

            },

            setInteger: function() {

            this.set("UsrInteger1", 2);

            }

        },

 

and replace UsrInteger1 with the name of your integer column from the object and specify the value of 1 or 2 in this part

 

this.set("UsrInteger1", 2);

 

for each detail schema separately. As a result, each time you add the file to each detail your integer column will be populated with the correct integer value.

 

Best regards,

Oscar

Show all comments

How to create duplication rules for custom object

Like 0

Like

3 comments

The following article on Academy describes how to add a new duplication rule:

https://academy.creatio.com/documents/base/7-15/duplicate-search-rules

 

The duplication rule is created for a custom section as well. Just make sure that  the [Indexing for full-text search] checkbox is selected in sections properties - https://i.imgur.com/9fgFFAQ.png

Alina Kazmirchuk,

Hi,

I want to create duplicate rules for a custom object that is not a section. For example, I have a detail on the project section for participating schools, I want the records there to be unique, meaning, accountID+projectId should be unique.

How can I acheive that?

Thanks!

Hi Chani,

 

Were you able to create duplicate search rule for details?

 

Thank you

Show all comments
attachments
voicenote
7.15
Sales_Creatio

Hello, 

Is there any way to record voice note in contact section ? Instead of writing a note, my client needs to record his notes. 

Thank you

Like 1

Like

7 comments

Hello Sanae, 

 

There are no basic tools and features to realize your business task on a clean install of a standard Creatio product. It can be done only by means of development and customization, but unfortunately, we do not have any examples of its implementation.

 

Kind regards, 

Olga. 

Olga Avis,

Thank you for your reply. Have a nice day.

Sanae ADRAR,

 

If your client uses chrome only (no mobile app), I suggest that you find a voice recorder/transcriber extension that allows you to put the transcripted text in the [Note] text area.

 

Thank you

Mohamed

Mohamed Ouederni,

Thank you Mohamed!! I see that we can use it only with chrome. my client uses IE and the mobile but I will try it anyway. 

Thank you again.

Sanae ADRAR,

Hello, did you find a solution for mobile app?

Mykhailo Kniaziev,

 

There is no such functionality yet, but I will assign your case to this project to increase its priority.  

Show all comments

In this example https://academy.creatio.com/documents/technic-sdk/7-15/handling-selection-several-records-examples there is a mention about method to open a lookup in the Case 2 example as 

this.openLookup(config, this.lookupCallback, this);

similary is there a method to open up a pre-configured page to get some inputs and the inputs are then used in the multiselect records?

 

Like 0

Like

10 comments
Best reply

Sriraksha KS,

 

1. The schema resources should be added to the dependencies. For example:

 

define("ActivitySectionV2", ["ConfigurationConstants", "ActivitySectionV2Resources"],

    function(ConfigurationConstants, resources) {...}

 

2. UsrContact /UsrAccount  fields are just attributes of inputBox page. They are not presented in the database.

 

Please feel free to see the full example below:

 

define("ActivitySectionV2", ["ConfigurationConstants", "ActivitySectionV2Resources"],
    function(ConfigurationConstants, resources) {
        return {
            // Section schema name.
            entitySchemaName: "Activity",
            // Section view model methods.
            methods: {
                // Defines if the menu option is enabled. 
                isCustomActionEnabled: function() {
                    // Attempt to receive the selected record indentifier array
                    var selectedRows = this.get("SelectedRows");
                    // If the array contains some elements (at least one of the records is selected from the list),
                    // it returns true, otherwise — false.
                    return selectedRows ? (selectedRows.length > 0) : false;
                },
 
                openInputBox: function() {
				    this.set("UsrContactCollection", new Terrasoft.Collection());
				    this.set("UsrAccountCollection", new Terrasoft.Collection());
				    this.set("UsrContact", null);
				    this.set("UsrAccount", null);
				    var controls = {
				        "UsrContact": {
				            dataValueType: Terrasoft.DataValueType.ENUM,
				            isRequired: true,
				            caption: resources.localizableStrings.UsrContactCaption,
				            value: {
				                bindTo: "UsrContact"
				            },
				            customConfig: {
				                tag: "Contact",
				                list: {
				                    bindTo: "UsrContactCollection"
				                },
				                prepareList: {
				                    bindTo: "getCollectionValues"
				                },
				                loadNextPage: {
				                    bindTo: "loadCollectionNextPage"
				                }
				            }
				        },
				        "UsrAccount": {
				            dataValueType: Terrasoft.DataValueType.ENUM,
				            isRequired: true,
				            caption: resources.localizableStrings.UsrAccountCaption,
				            value: {
				                bindTo: "UsrAccount"
				            },
				            customConfig: {
				                tag: "Account",
				                list: {
				                    bindTo: "UsrAccountCollection"
				                },
				                prepareList: {
				                    bindTo: "getCollectionValues"
				                },
				                loadNextPage: {
				                    bindTo: "loadCollectionNextPage"
				                }
				            }
				        }
				    };
 
				    Terrasoft.utils.inputBox(resources.localizableStrings.UsrInputBoxCaption,
			        this.openInputBoxHandler,
			        [Terrasoft.MessageBoxButtons.OK, Terrasoft.MessageBoxButtons.CANCEL],
			        this,
			        controls
			    );
			    Terrasoft.each(Terrasoft.MessageBox.controlArray, function(item) {
			        item.control.bind(this);
			    }, this);
			},
 
 
			getCollectionValues: function(filter, list, tag) {
			    if (Ext.isEmpty(list)) {
			        return;
			    }
			    list.clear();
			    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
			        rootSchemaName: tag,
			        isPageable: true,
			        rowCount: 20
			    });
			    this.buildCollectionQuery(esq, list, filter, tag);
			},
 
 
			loadCollectionNextPage: function(listParams, tag) {
			    if (!this.get("CanLoadMore" + tag)) {
			        return;
			    }
			    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
			        rootSchemaName: tag,
			        isPageable: true,
			        rowCount: 20,
			        rowsOffset: listParams.listView.collectionItemsCount
			    });
			    this.buildCollectionQuery(esq, listParams.list, listParams.filterValue, tag);
			},
 
			buildCollectionQuery: function(esq, list, filter, tag) {
			    esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_COLUMN, "value");
			    var orderColumn = esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_DISPLAY_COLUMN, "displayValue");
			    orderColumn.orderDirection = Terrasoft.OrderDirection.ASC;
			    esq.filters.addItem(esq.createPrimaryDisplayColumnFilterWithParameter(
			        Terrasoft.ComparisonType.START_WITH, filter, Terrasoft.DataValueType.TEXT));
			    esq.getEntityCollection(function(response) {
			        if (response && response.success) {
			            var preObject = {};
			            response.collection.each(function(item) {
			                preObject[item.get("value")] = item.values;
			            }, this);
			            list.loadAll(preObject);
			            this.set("CanLoadMore" + tag, response.collection.getCount() === 20);
			        }
			    }, this);
			},
 
		openInputBoxHandler: function(returnCode, controlData) {
			    if (Terrasoft.MessageBoxButtons.OK.returnCode === returnCode) {
			    	console.log("it works");
                    const activeRowId = controlData.UsrContact.value.value;
			    	  // Receiving of the selected record identifier array. 
                    var selectedRows = this.get("SelectedRows");
                    // The procession starts if at least one record is selected from the list and the owner is selected 
                    // in the lookup.
                    if ((selectedRows.length > 0)) {
                        // Creation of the batch query class instance.
                        var batchQuery = this.Ext.create("Terrasoft.BatchQuery");
                        // Update of each selected record.
                        selectedRows.forEach(function(selectedRowId) {
                            // Creation of the UpdateQuery class instance with the Activity root schema.
                            var update = this.Ext.create("Terrasoft.UpdateQuery", {
                                rootSchemaName: "Activity"
                            });
                            // Applying filter to determine the record for update. 
                            update.enablePrimaryColumnFilter(selectedRowId);
                            // The [Owner] column is populated with the value that equals to
                            // the lookup selected contact id.
                            update.setParameterValue("Owner", activeRowId, this.Terrasoft.DataValueType.GUID);
                            // Adding a record update query to the batch query. 
                            batchQuery.add(update);
                        }, this);
                        // Batch query to the server.
                        batchQuery.execute(function() {
                            // Record list update.
                            this.reloadGridData();
                        }, this);
                    }
			        // TODO: your code here
			    }
			},
 
                // Overriding the base virtual method, returning the section action collection. 
                getSectionActions: function() {
                    // Calling of the parent method implementation, 
                    // returning the initialized section action collection.
                    var actionMenuItems = this.callParent(arguments);
                    // Adding separator line.
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        Type: "Terrasoft.MenuSeparator",
                        Caption: ""
                    }));
                    // Adding a menu option to the section action list.
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        // Binding the menu option title to the localized schema string.
                        "Caption": { bindTo: "Resources.Strings.SetOwnerCaption" },
                        // Binding of the action handler method.
                        "Click": { bindTo: "openInputBox" },
                        // Binding the menu option enable property to the value that returns the isCustomActionEnabled method.
                        "Enabled": { bindTo: "isCustomActionEnabled" },
                        // Multiselection mode enabling.
                        "IsEnabledForSelectedAll": true
                    }));
                    // Returning of the added section action collection.
                    return actionMenuItems;
                }
            }
        };
    });

 

As I understood, you want to open a pre-configured page to select a value instead of the lookup page. Please correct me if I am wrong. 

I suppose you can just create a new lookup with needed fields. That allows you to use the out-of-the box functionality without additional development. Please see the article on Academy:

 https://academy.creatio.com/documents/administration/7-15/creating-and-registering-lookups

Could you please clarify your business task? Why the lookup page is not appropriate for you?

However you can take a look at the LookupUtilitiesV2 schema and investigate how the open method works - https://prnt.sc/rhlzfr .

 

Alina Kazmirchuk,

Dear Alina, The use case is to get multiple values to be assigned for the records instead of just one. Ex., For the selected records would like to setup the owner and also the due date. So if we are able to open up a page which has a date and owner lookup field. Then using that page, the date and owner can be read and updated into each of the records. Hope it is clear now?

Thanks a lot Alina. This will work. Will try it out and let you know.

Ganesh Babu,

Thank you so much for explanation. I can recommend you to use the inputBox for that.

There is an example how to open the inputBox with Account and Contact lookup fields. Add code below into methods section and bind openInputBox method.

Please see the result here -> https://prnt.sc/rhntk5

openInputBox: function() {
 
    this.set("UsrContactCollection"new Terrasoft.Collection());
 
    this.set("UsrAccountCollection"new Terrasoft.Collection());
 
    this.set("UsrContact", null);
 
    this.set("UsrAccount", null);
 
    var controls = {
 
        "UsrContact": {
 
            dataValueType: Terrasoft.DataValueType.ENUM,
 
            isRequired: true,
 
            caption: resources.localizableStrings.UsrContactCaption,
 
            value: {
 
                bindTo: "UsrContact"
 
            },
 
            customConfig: {
 
                tag: "Contact",
 
                list: {
 
                    bindTo: "UsrContactCollection"
 
                },
 
                prepareList: {
 
                    bindTo: "getCollectionValues"
 
                },
 
                loadNextPage: {
 
                    bindTo: "loadCollectionNextPage"
 
                }
 
            }
 
        },
 
        "UsrAccount": {
 
            dataValueType: Terrasoft.DataValueType.ENUM,
 
            isRequired: true,
 
            caption: resources.localizableStrings.UsrAccountCaption,
 
            value: {
 
                bindTo: "UsrAccount"
 
            },
 
            customConfig: {
 
                tag: "Account",
 
                list: {
 
                    bindTo: "UsrAccountCollection"
 
                },
 
                prepareList: {
 
                    bindTo: "getCollectionValues"
 
                },
 
                loadNextPage: {
 
                    bindTo: "loadCollectionNextPage"
 
                }
 
            }
 
        }
 
    };
 
    Terrasoft.utils.inputBox(resources.localizableStrings.UsrInputBoxCaption,
 
        this.openInputBoxHandler,
 
        [Terrasoft.MessageBoxButtons.OK, Terrasoft.MessageBoxButtons.CANCEL],
 
        this,
 
        controls
 
    );
 
    Terrasoft.each(Terrasoft.MessageBox.controlArray, function(item) {
 
        item.control.bind(this);
 
    }this);
 
},
 
getCollectionValues: function(filter, list, tag) {
 
    if (Ext.isEmpty(list)) {
 
        return;
 
    }
 
    list.clear();
 
    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
 
        rootSchemaName: tag,
 
        isPageable: true,
 
        rowCount: 20
 
    });
 
    this.buildCollectionQuery(esq, list, filter, tag);
 
 
},
 
loadCollectionNextPage: function(listParams, tag) {
 
    if (!this.get("CanLoadMore" + tag)) {
 
        return;
 
    }
 
    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
 
        rootSchemaName: tag,
 
        isPageable: true,
 
        rowCount: 20,
 
        rowsOffset: listParams.listView.collectionItemsCount
 
    });
 
    this.buildCollectionQuery(esq, listParams.list, listParams.filterValue, tag);
 
},
 
 
buildCollectionQuery: function(esq, list, filter, tag) {
 
    esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_COLUMN"value");
 
    var orderColumn = esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_DISPLAY_COLUMN"displayValue");
 
    orderColumn.orderDirection = Terrasoft.OrderDirection.ASC;
 
    esq.filters.addItem(esq.createPrimaryDisplayColumnFilterWithParameter(
 
        Terrasoft.ComparisonType.START_WITH, filter, Terrasoft.DataValueType.TEXT));
 
    esq.getEntityCollection(function(response) {
 
        if (response && response.success) {
 
            var preObject = {};
 
            response.collection.each(function(item) {
 
                preObject[item.get("value")] = item.values;
 
            }this);
 
            list.loadAll(preObject);
 
            this.set("CanLoadMore" + tag, response.collection.getCount() === 20);
 
        }
 
    }this);
 
},
 
 
 
openInputBoxHandler: function(returnCode, controlData) {
 
    if (Terrasoft.MessageBoxButtons.OK.returnCode === returnCode) {
 
        // TODO: your code here
 
    }
 
}

 

 

Alina Kazmirchuk,

 

Thank you for the code Alina. Even I have this requirement for our customer.

I tried with this code, it says issue with Resources.

Whats is the dependency to be mentioned in dependencies for 

resources.localizableStrings

UsrContact /UsrAccount is Entity Column name Or Its a Attribute?

 

It would help us if you provide us with the full code with instructions.

 

Thank you in advance

Sriraksha

Sriraksha KS,

 

1. The schema resources should be added to the dependencies. For example:

 

define("ActivitySectionV2", ["ConfigurationConstants", "ActivitySectionV2Resources"],

    function(ConfigurationConstants, resources) {...}

 

2. UsrContact /UsrAccount  fields are just attributes of inputBox page. They are not presented in the database.

 

Please feel free to see the full example below:

 

define("ActivitySectionV2", ["ConfigurationConstants", "ActivitySectionV2Resources"],
    function(ConfigurationConstants, resources) {
        return {
            // Section schema name.
            entitySchemaName: "Activity",
            // Section view model methods.
            methods: {
                // Defines if the menu option is enabled. 
                isCustomActionEnabled: function() {
                    // Attempt to receive the selected record indentifier array
                    var selectedRows = this.get("SelectedRows");
                    // If the array contains some elements (at least one of the records is selected from the list),
                    // it returns true, otherwise — false.
                    return selectedRows ? (selectedRows.length > 0) : false;
                },
 
                openInputBox: function() {
				    this.set("UsrContactCollection", new Terrasoft.Collection());
				    this.set("UsrAccountCollection", new Terrasoft.Collection());
				    this.set("UsrContact", null);
				    this.set("UsrAccount", null);
				    var controls = {
				        "UsrContact": {
				            dataValueType: Terrasoft.DataValueType.ENUM,
				            isRequired: true,
				            caption: resources.localizableStrings.UsrContactCaption,
				            value: {
				                bindTo: "UsrContact"
				            },
				            customConfig: {
				                tag: "Contact",
				                list: {
				                    bindTo: "UsrContactCollection"
				                },
				                prepareList: {
				                    bindTo: "getCollectionValues"
				                },
				                loadNextPage: {
				                    bindTo: "loadCollectionNextPage"
				                }
				            }
				        },
				        "UsrAccount": {
				            dataValueType: Terrasoft.DataValueType.ENUM,
				            isRequired: true,
				            caption: resources.localizableStrings.UsrAccountCaption,
				            value: {
				                bindTo: "UsrAccount"
				            },
				            customConfig: {
				                tag: "Account",
				                list: {
				                    bindTo: "UsrAccountCollection"
				                },
				                prepareList: {
				                    bindTo: "getCollectionValues"
				                },
				                loadNextPage: {
				                    bindTo: "loadCollectionNextPage"
				                }
				            }
				        }
				    };
 
				    Terrasoft.utils.inputBox(resources.localizableStrings.UsrInputBoxCaption,
			        this.openInputBoxHandler,
			        [Terrasoft.MessageBoxButtons.OK, Terrasoft.MessageBoxButtons.CANCEL],
			        this,
			        controls
			    );
			    Terrasoft.each(Terrasoft.MessageBox.controlArray, function(item) {
			        item.control.bind(this);
			    }, this);
			},
 
 
			getCollectionValues: function(filter, list, tag) {
			    if (Ext.isEmpty(list)) {
			        return;
			    }
			    list.clear();
			    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
			        rootSchemaName: tag,
			        isPageable: true,
			        rowCount: 20
			    });
			    this.buildCollectionQuery(esq, list, filter, tag);
			},
 
 
			loadCollectionNextPage: function(listParams, tag) {
			    if (!this.get("CanLoadMore" + tag)) {
			        return;
			    }
			    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
			        rootSchemaName: tag,
			        isPageable: true,
			        rowCount: 20,
			        rowsOffset: listParams.listView.collectionItemsCount
			    });
			    this.buildCollectionQuery(esq, listParams.list, listParams.filterValue, tag);
			},
 
			buildCollectionQuery: function(esq, list, filter, tag) {
			    esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_COLUMN, "value");
			    var orderColumn = esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_DISPLAY_COLUMN, "displayValue");
			    orderColumn.orderDirection = Terrasoft.OrderDirection.ASC;
			    esq.filters.addItem(esq.createPrimaryDisplayColumnFilterWithParameter(
			        Terrasoft.ComparisonType.START_WITH, filter, Terrasoft.DataValueType.TEXT));
			    esq.getEntityCollection(function(response) {
			        if (response && response.success) {
			            var preObject = {};
			            response.collection.each(function(item) {
			                preObject[item.get("value")] = item.values;
			            }, this);
			            list.loadAll(preObject);
			            this.set("CanLoadMore" + tag, response.collection.getCount() === 20);
			        }
			    }, this);
			},
 
		openInputBoxHandler: function(returnCode, controlData) {
			    if (Terrasoft.MessageBoxButtons.OK.returnCode === returnCode) {
			    	console.log("it works");
                    const activeRowId = controlData.UsrContact.value.value;
			    	  // Receiving of the selected record identifier array. 
                    var selectedRows = this.get("SelectedRows");
                    // The procession starts if at least one record is selected from the list and the owner is selected 
                    // in the lookup.
                    if ((selectedRows.length > 0)) {
                        // Creation of the batch query class instance.
                        var batchQuery = this.Ext.create("Terrasoft.BatchQuery");
                        // Update of each selected record.
                        selectedRows.forEach(function(selectedRowId) {
                            // Creation of the UpdateQuery class instance with the Activity root schema.
                            var update = this.Ext.create("Terrasoft.UpdateQuery", {
                                rootSchemaName: "Activity"
                            });
                            // Applying filter to determine the record for update. 
                            update.enablePrimaryColumnFilter(selectedRowId);
                            // The [Owner] column is populated with the value that equals to
                            // the lookup selected contact id.
                            update.setParameterValue("Owner", activeRowId, this.Terrasoft.DataValueType.GUID);
                            // Adding a record update query to the batch query. 
                            batchQuery.add(update);
                        }, this);
                        // Batch query to the server.
                        batchQuery.execute(function() {
                            // Record list update.
                            this.reloadGridData();
                        }, this);
                    }
			        // TODO: your code here
			    }
			},
 
                // Overriding the base virtual method, returning the section action collection. 
                getSectionActions: function() {
                    // Calling of the parent method implementation, 
                    // returning the initialized section action collection.
                    var actionMenuItems = this.callParent(arguments);
                    // Adding separator line.
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        Type: "Terrasoft.MenuSeparator",
                        Caption: ""
                    }));
                    // Adding a menu option to the section action list.
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        // Binding the menu option title to the localized schema string.
                        "Caption": { bindTo: "Resources.Strings.SetOwnerCaption" },
                        // Binding of the action handler method.
                        "Click": { bindTo: "openInputBox" },
                        // Binding the menu option enable property to the value that returns the isCustomActionEnabled method.
                        "Enabled": { bindTo: "isCustomActionEnabled" },
                        // Multiselection mode enabling.
                        "IsEnabledForSelectedAll": true
                    }));
                    // Returning of the added section action collection.
                    return actionMenuItems;
                }
            }
        };
    });

 

Alina Kazmirchuk,

Thank you Alina, Will try this out. 

Regards,

Sriraksha

Alina Kazmirchuk,

Thank you for the solution. I have a doubt, In select rows, it returns only Id, Is there a way where i can take Name?

 

isCustomActionEnabled: function() {
                    // Attempt to receive the selected record indentifier array
                    var selectedRows = this.get("SelectedRows");
                    // If the array contains some elements (at least one of the records is selected from the list),
                    // it returns true, otherwise — false.
                    return selectedRows ? (selectedRows.length > 0) : false;
                },

 

Please help on this, i tried using ESQ , even though i got record using, i was not able to use it in next code in Section. If it was in Page i would have used Attribute . but, here I am stuck .

Please help.

 

openInputBoxHandler: function(returnCode, controlData) {

                if (Terrasoft.MessageBoxButtons.OK.returnCode === returnCode) {

                    const activeRowId = controlData.UsrContact.value.value;

                      

                    var selectedRows = this.get("SelectedRows");

                    this.set("AccName", null);

                    if ((selectedRows.length > 0)) {

                      

                        var batchQuery = this.Ext.create("Terrasoft.BatchQuery");

                       

                        selectedRows.forEach(function(selectedRowId) {

                            

                           /* var esq = Ext.create("Terrasoft.EntitySchemaQuery", {

                                        rootSchemaName: "Account"

                                    });

                            esq.addColumn("Id");

                            esq.addColumn("Name" );

                            var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, 

                            "Id", selectedRowId );   

                            esq.filters.add("esqFirstFilter", esqFirstFilter);

                            var e = esq.getEntityCollection();

                            esq.getEntityCollection(function (result) {

                            if (result.success) {

                                result.collection.each(function (item) {

                                this.set("AccName",item.get("Name"));

                                });

                                

                            }

                            this.showInformationDialog("Data query error");

                            }, this);*/



                            var insert = Ext.create("Terrasoft.InsertQuery", {

                            rootSchemaName: "Activity"

                            });

                        

                            insert.setParameterValue("Title", "Visit Account "  , Terrasoft.DataValueType.TEXT);

                            insert.setParameterValue("StartDate", new Date(),

                                Terrasoft.DataValueType.DATE);

                            insert.setParameterValue("DueDate", controlData.UsrDueDate.value,

                                Terrasoft.DataValueType.DATE);

                            insert.setParameterValue("ActivityCategory", "F51C4643-58E6-DF11-971B-001D60E938C6",

                                Terrasoft.DataValueType.GUID);

                            insert.setParameterValue("Status", "384D4B84-58E6-DF11-971B-001D60E938C6",

                                Terrasoft.DataValueType.GUID);

                            insert.setParameterValue("Owner", activeRowId,

                                Terrasoft.DataValueType.GUID);

                            insert.setParameterValue("Account", selectedRowId,

                                Terrasoft.DataValueType.GUID);

                                

                                batchQuery.add(insert);

                            

                        }, this);

                        

                        //batchQuery.execute();

                        batchQuery.execute(function() {

                            this.reloadGridData();

                        }, this);

                        

                        

                        

                    }

                }

                },

                

                

Alina Kazmirchuk,

 

Can the controls in the openInputBox be disabled? What is the property used for it.

I used "enabled : false"

 "UsrQuestion": {

                            dataValueType: Terrasoft.DataValueType.TEXT,

                            isRequired: true,

                            caption: resources.localizableStrings.UsrQuestionCaption,

                            value: {

                                bindTo: "UsrQuestion",

                                enabled: false

                            },

                        }

But dint work. Can you please help .

Alina Kazmirchuk,

How can we apply filter in 

 "UsrContact": {
 
            dataValueType: Terrasoft.DataValueType.ENUM,
 
            isRequired: true,
 
            caption: resources.localizableStrings.UsrContactCaption,
 
            value: {
 
                bindTo: "UsrContact"
 
            },
 
            customConfig: {
 
                tag: "Contact",
 
                list: {
 
                    bindTo: "UsrContactCollection"
 
                },
 
                prepareList: {
 
                    bindTo: "getCollectionValues"
 
                },
 
                loadNextPage: {
 
                    bindTo: "loadCollectionNextPage"
 
                }
 
            }
 
        },
  say I want to filter only customer type contacts.

Please help how to pass filter attribute here. 

 

Thanks,

Sriraksha

Show all comments
calendar
7.15
Sales_Creatio

Hey Peeps!

 

When I set calendar for an employee setting day offs , how the system allows scheduling activities on that day. 

How to calculate efficiency of an employee when he has reduced working hours but yet he is working?

Like 0

Like

1 comments

Dear Shailey,

 

There is no such functionality that allows to calculate the user's efficiency. You can use the activities for any days. For example, if a customer center user works with cases, he can set the activity with the completed status where start date and due date is the actual time spent to process this case. I case a user spends 1 hour for a ticket - he sets the 1 hour activity.

Another workaround is to use SysUserSession table to see how much time a user was logged in and use this data in the efficiency estimation.  You will be able to see how many days the user was logged in and compare it with the overall business days amount in your targets. 

Other than that, the there is no default tool to calculate this data.

 

Regards,

Dean

Show all comments