Dear Community,

 

We have a status lookup in a section edit page. If the value of the look up becomes "Queued" , the INFORMATION_BUTTON must appear. Any other status must make not make the button visible.

 

I have the following code to insert this INFORMATION_BUTTON in Diff array

    {

                "operation": "insert",

                "name": "QueuedInfoChat",

                "values": {

                    "layout": {

                        "colSpan": 7,

                        "rowSpan": 1,

                        "column": 2,

                        "row": 1,

                        "layoutName": "Header"

                    },

                    "itemType": Terrasoft.ViewItemType.INFORMATION_BUTTON,

                    "content": {

                        "bindTo": "Resources.Strings.QueuedStatusChat"

                    },

                    "visible": {

                        "bindTo": "QueuedToolTipChat"

                    }

                },

                "parentName": "Header",

                "propertyName": "items",

                "index": 8

            }

And the attribute

"QueuedToolTipChat": {

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": true

            }

When I tried setting this attribute to false, the button is still visible. Please see image attached for reference

Any suggestion would help.

 

Thanks in Advance!

Like 0

Like

2 comments

Hello Shivani,

 

"visible" parameter doesn't work for the INFORMATION_BUTTON item type, but I found a workaround. This function was called in the onEntityInitializedFunction:

          	onEntityInitialized: function(){
				this.callParent(arguments);
              	this.checkCondition();
            },

and

checkCondition: function(){
			if (this.get("Name")=="123 2"){
				document.getElementById("ContactPageV2SimpleInfoButtonButton-imageEl").style.display = "none";
            } else {
			return;
            }
          },

where ContactPageV2SimpleInfoButtonButton-imageEl was received from the HTML of the page (this particular Id remains static on the contact page for all contact records):

As a result button successfully disappears in case the name of a contact is "123 2" so you can test the following code on your side.

 

Best regards,

Oscar

Oscar Dylan,

Thank you for your response Oscar. We were able to achieve this through another way as well. Adding the snippet for those who might need it.

The following code is added to Diff array where Resources.Images.QueueInfo - QueueInfo is an image added

{

                "operation": "insert",

                "name": "QueuedInfoChat",

                "values": {

                    "layout": {

                        "colSpan": 2,

                        "rowSpan": 1,

                        "column": 8,

                        "row": 1

                    },

                    "itemType": 5,

                    "hint": {

                        "bindTo": "Resources.Strings.QueuedStatusChat"

                    },

                    "tips": [],

                    "canExecute": {

                        "bindTo": "canBeDestroyed"

                    },

                    "imageConfig": {

                        "bindTo": "Resources.Images.QueueInfo"

                    },

                    "markerValue": "Update-button-QueuedInfoChat",

                    "tag": "Update-button-QueuedInfoChat",

                    "visible": {

                        "bindTo": "QueuedChatVisibility"

                    }

                },

                "parentName": "Header",

                "propertyName": "items",

                "index": 5

            }

The following is added to attributes

"QueuedChatVisibility": {

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": false

            }

 

Last piece is the method that checks the status. This method is called in onEntityInitialized function

 

    checkChatStatus :function()

            {

                var chatStatus="";

                

                try 

                    {

                        chatStatus = this.get("UsrChatStatus").displayValue;

                    }

                 catch (e) {

                     this.console.log("Chat status not set");

                    

                }

            

                if(chatStatus!==undefined && chatStatus!=="")

                {

                    if(chatStatus==="Queued")

                    {

                        this.set("QueuedChatVisibility",true);

                        this.console.log("Setting tooltip chat true");

                        return true;

                    }

                }

                this.set("QueuedChatVisibility",false);

                this.console.log("setting chat to false");

                return true;

            }

 

Thanks again!

 

Show all comments

Hello,

 

I am trying to get the count of records that are only appearing more than once in a section. I have made the chart dashboard for this but, it is showing single values also which I do not want to be shown. I have attached the dashboard setting page below.

 

In this, the chart is also showing single count values which needs to be hidden. I have searched for a filter condition but could not find anything.

 

Hoping for an early response. 

Like 0

Like

3 comments
Best reply

malay garg,

You need to go to the higher object in the hierarchy to check this connection. The resulting filter depends on where those records appear. In the system, you will be able to check the number of records in a specific section/record, like the number of contacts in one account. 

 

Best regards,

Angela

Dear Malay,

 

Try adding the "Count" filter to the dashboard to show only values that appear more than once. 

 

Best regards,

Angela

I have already tried this, but function 'count' is not available in any condition. I have attached the screenshots of the filters at both places.

 

 

malay garg,

You need to go to the higher object in the hierarchy to check this connection. The resulting filter depends on where those records appear. In the system, you will be able to check the number of records in a specific section/record, like the number of contacts in one account. 

 

Best regards,

Angela

Show all comments

Hello!

 

I am trying to make a boolean field editable based on  another boolean.

Can anyone provide me a code format of business rules for mobile and correct file where to put them.

 

Thanks.

Like 0

Like

6 comments

Hello,

 

You need to create a separate module and then add it to the mobile application manifest (PagesExtensions property of the object model) as described here or here. In this community post, I've provided an example of a business rule that activates a field based on conditions.

 

Best regards,

Oscar

Thanks Oscar,

 

I have got it working.

Hello,

 

I also applied same business rule for a string which needs to be permanently read-only in Order section. So, I have put in the condition column Total amount as negative which will never be true. But, this is not working in mobile.

I have attached that business rule below. I have added this module in the page extensions of Order section also.

 

Terrasoft.sdk.Model.addBusinessRule("Order", {

    ruleType: Terrasoft.RuleTypes.Activation,

    events: [Terrasoft.BusinessRuleEvents.Load, Terrasoft.BusinessRuleEvents.ValueChanged],

    triggeredByColumns: ["JFLOrderOneOffTotal" ],

    conditionalColumns: [

       

      {name: "JFLOrderOneOffTotal", value: "-1.00"} 

    ],

    dependentColumnNames: ["JFLPaymentMandateLink"]

});

 

I want to make "JFLPaymentMandateLink" field read only.

 

Hoping for an early reply.

 

malay garg,

 

Hello,

 

You need to install the emulator to debug the logic (can be found here). You need to check which value if passed for the JFLOrderOneOffTotal column and if the rule is triggered. Also you will need to recycle the application pool after creating a new rule and adding it to the page extensions in the manifest.

 

Best regards,

Oscar

Oscar Dylan,

 

Thanks for the information.

I am looking for a logic to make a Date, String, Integer field read only in mobile.

The column JFLOrderOneOffTotal was chosen because it can never be negative in my implementation, so the affected field would be always read only. 

But, as this is not working , can you please suggest me proper logic to make these fields read only always.

Hoping for an early reply.

 

Regards,

 

Malay.

 

Malay,

 

You are welcome!

 

Yes, you can do it! See the example of my business rule below:

Terrasoft.sdk.Model.addBusinessRule("Account", {
    ruleType: Terrasoft.RuleTypes.Activation,
    events: [Terrasoft.BusinessRuleEvents.Load, Terrasoft.BusinessRuleEvents.ValueChanged],
    triggeredByColumns: ["UsrInteger"],
    conditionalColumns: [
        {name: "UsrInteger", value: 1}
    ],
    dependentColumnNames: ["UsrWaranty","UsrDate","UsrDelivery"]
});

Please note that the business rule name should be the same as the object for which the rule is created (not the module name, but the rule name ("Account" in my case, one of the arguments for the Terrasoft.sdk.Model.addBusinessRule method)). The module itself can have any name you want (in my case it is "UsrAccountReadOnly" that was then added to the manifest:

).

 

As a result all three columns became read-only: UsrWaranty - integer column, "UsrDate" - date column and "UsrDelivery" - string column:

The condition is that columns become unlocked when the UsrInteger column value is 1. Once this rule was created and the application pool restarted and relogin to the mobile app executed the rule started to work as expected. So you need to double-check your rule.

 

Best regards,

Oscar

Show all comments

Hello,

 

I am trying to get a link in Activity section to redirect to Order section directly by tapping on it. I have attached a screenshot ahead.

 

Please let me know how to implement this.

Like 0

Like

1 comments

Hello Malay,

 

Please open the mobile application wizard and simply add the "Orders" section to it:

And relogin to the mobile app.

 

Best regards,

Oscar

Show all comments

Hello!

 

I am trying to get the date field updated for multiple records using a custom Action.

I have referred to this article for it: Change of the field value of multiple records using custom action | Community Creatio

 

I have successfully created a pop up but, the update is not reflecting in the selected records.

I have also attached the screenshot of it and the code that I have used.

 

The code that I have used:

 



                getSectionActions: function() {

                  actionMenuItems.addItem(this.getButtonMenuItem({

                        "Caption": {bindTo: "Resources.Strings.MultiplyChangeAction"},

                        "Click": {bindTo: "showDateInfo"},

                        "Enabled": {bindTo: "isCustomActionEnabled"}

                    }));

                    // Returning of the added section action collection.

                    return actionMenuItems;

                },

             

              showDateInfo: function() {

                Terrasoft.utils.inputBox("Set Visit Date for update", function(result, arg) {

                        if (result === Terrasoft.MessageBoxButtons.YES.returnCode) {

                            var date = arg.date.value;

                         

                            var autoIds = this.getSelectedItems();

                            this.updateDate(function(context, result) {

                            }, autoIds, date);

 

                        }

                    }, [{

                        className: "Terrasoft.Button",

                        caption: "OK",

                        returnCode: "yes"

                    }, "cancel"], this,

                    {

               

                        date: {

                            dataValueType: Terrasoft.DataValueType.DATE,

                            caption: "Visit Date",

                            customConfig: {

                                className: "Terrasoft.DateEdit",

                                height: "17px"

                            }

                       

                    },          

                    },

                                         

                    {

                        defaultButton: 0,

                        style:  {

                            borderStyle: "ts-messagebox-border-style-blue ts-messagebox-border-no-header",

                            buttonStyle: "blue"

                        }

                    }

                );

            },

              updateDate: function(callback, autoIds, date) {

                        var update = Ext.create("Terrasoft.UpdateQuery", {

                            rootSchemaName: "JFLFieldSales"

                        });

                        var filters = Terrasoft.createFilterGroup();

                        filters.logicalOperation = Terrasoft.LogicalOperatorType.OR;

                        autoIds.forEach(function(item) {

                            var productIdFilter = update.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,

                            "Id", item);

                            filters.add("ProductIdFilter" + item, productIdFilter);

                        }, this);

                        update.filters.add(filters);

                        if (date) {

                            update.setParameterValue("JFLAssignmentDate", date, Terrasoft.DataValueType.Date);

                        //  update.setParameterValue("JFLAssignmentDate", time, Terrasoft.DataValueType.Date);

                        }

                        

                        update.execute(function(result) {

                            callback.call(this, result);

                        }, this);

              }

            }

        };

    });

 

 

 

I have also attached full code of the schema as a file.

 

Also, please let me know if I can update the time also as the field in the record is of type DATE_TIME.

File attachments
Like 0

Like

1 comments

Hello Malay,

 

To update the date a little customization is needed. Here is an example of my update function:

updateAccount: function(callback, autoIds, valueWarranty, valueDelivery, valueDate) {
                        var update = Ext.create("Terrasoft.UpdateQuery", {
                            rootSchemaName: "Account"
                        });
                        var filters = Terrasoft.createFilterGroup();
                        filters.logicalOperation = Terrasoft.LogicalOperatorType.OR;
                        autoIds.forEach(function(item) {
                            var accountFIlter = update.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,
                            "Id", item);
                            filters.add("ProductIdFilter" + item, accountFIlter);
                        }, this);
                        update.filters.add(filters);
                        if (valueWarranty) {
                            update.setParameterValue("UsrWaranty", valueWarranty, Terrasoft.DataValueType.TEXT);
                        }
                        if (valueDelivery) {
                            update.setParameterValue("UsrDelivery", valueDelivery, Terrasoft.DataValueType.TEXT);
                        }
            			if (valueDate) {
                          	valueDate="\""+valueDate+"T00:00:00.000"+"\"";
                            update.setParameterValue("UsrDate", valueDate, Terrasoft.DataValueType.DATE);
                        }
                        update.execute(function(result) {
                            callback.call(this, result);
                        }, this);
                    }

The main idea here is in this string:

valueDate="\""+valueDate+"T00:00:00.000"+"\"";

 

If you take a look at the regular update query that is sent when manually changing the date column value you will see that the value is transferred as "2021-03-21T00:00:00.000". To successfully update the date column using the modal window you will need to pass the date value as: 2021-03-21 and then the function itself will transform the value to "2021-03-21T00:00:00.000", add it to the update query parameters and send it to the server. As a result the field will be updated.

 

Best regards,

Oscar

Show all comments

Hello all,

 

I am trying to create a landing page to generate leads in my Creatio instance. However, despite matching the documentation and copying the code into my html from the landing page record, the page is not generating Creatio leads.

 

   

    Keen360 Submit Page

    

   
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


   

       

            Contact Us

       

       

       

            Full name:


           



            Company:


           



            Email:


           



            Phone number:


           



           

       

   

   






    /**

    * Replace the "css-selector" placeholders in the code below with the element selectors on your landing page.

    * You can use #id or any other CSS selector that will define the input field explicitly.

    * Example: "Email": "#MyEmailField".

    * If you don't have a field from the list below placed on your landing, leave the placeholder or remove the line.

    */

    var config = {

        fields: {

            "Name": "#fname", // Name of a visitor, submitting the page

            "Email": "#email",

            "MobilePhone": "#phone",// Visitor's email

            "Company": "#cname" // Name of a company (for business landing pages)

        },

        landingId: "b95e7199-72e8-421d-8cac-dbd9ae45859f",

        serviceUrl: "https://keen360.creatio.com/0/ServiceModel/GeneratedObjectWebFormServic…",

        redirectUrl: "https://keen360.com/testing/keen360satisfaction.html"

    };

    /**

    * The function below creates a object from the submitted data.

    * Bind this function call to the "onSubmit" event of the form or any other elements events.

    * Example:

    */

    function createObject() {

        landing.createObjectFromLanding(config)

    }

    /**

    * The function below inits landing page using URL parameters.

    */

    function initLanding() {

        landing.initLanding(config)

    }

    function onSubmit() {

        createObject();



        console.log("onSubmit function was called");



        $("#name").empty;

        $("#email").empty;

        $("#number").empty;

        $("#company").empty;

    }

    

    jQuery(document).ready(initLanding)

    

   

 

File attachments
Like 0

Like

3 comments

It could be that you have required fields on the Lead object (by default "Customer need" is required. If you're not populating any required fields from the landing page, you'll need to add them as default values on the landing page record in Creatio. The Default Values tab will allow you to specify a default value for leads created from the landing page for Customer need, and another other possible required fields.

Ryan

Ryan Farley,

I have set up default values for any fields such as Customer need that are required by Creatio and prompts an error message if not filled in. If there are any that are required for landing pages to work but not required to actually save the Lead page then I may be missing those but I don't know if they exist.

Dear Kevin, Looks like the issue is as below.. as per the referer URL the site URL seems to be sending the below.. so try changing your landing page URL to https://keen360.com* and see if it works.. 

Show all comments

Hello,

I am working with the mobile application and specifically in the Activity section.

In this, I have configured the Actions-Visit Detail in the mobile app, but when I check the check-in/check-out in mobile application, the completion time is not getting updated in the detail in the web application for the record.

 

I also want to update the current location of mobile in the web application.

Please guide me on how to get this geolocation working.

I have also attached the screenshot of that detail.

 

 

Hoping for an early reply.

Like 0

Like

3 comments

Dear Malay,

 

Thank you for your question!

 

Could you please check if the mobile device has the "Geolocation" turned on and if the synchronization is fine in the Mobile Application before proceeding?

 

We recommend synchronizing the Mobile Application more often to update the results.

 

Please note that in order to display the additional check-in results and show the columns in the detail list, you may add the [Check-in and check-out performance result] detail object to the page through the section wizard.

 

Please be advised that if the GPS coordinates of the sales rep and the visited account are in the verification range, the check-in will be verified and the status of the visit will be changed to “In progress”. 

 

You may use this Academy Article for your reference: https://academy.creatio.com/docs/user/sales_tools/field_sales/check-in_…

 

Hope this helps!

 

In case you have any additional questions please do not hesitate to contact the support team!

 

Regards,

Danyil

 

Danyil Onoprienko,

 

Thank you for your response!

 

The GPS is turned on in the mobile and permission for location is also allowed.

Also, when I select check-in, the time and location is not getting updated in the system.

I have attached the screenshot of the  page here:

 

Dear Malay,

 

Thank you for your patience!

 

Please be advised that in order for the information in the 'Actions -Visit' and in the 'Check-in and Check-out results' to appear it would be required for the user in the Mobile Application to click the 'Check-in' option as in the screenshot below and click 'Synchronize now' in the settings:

 

The result would be as in the screenshot below:

 

 

If the synchronizing the Mobile Application won`t help, please try Updating the DB structre for All items in the Configuration settings, Generating the Source code for all and then Recompiling the system and checking the Action - Visit detail behavior once again.

 

Thank you!

 

Regards,

Danyil

Show all comments

Hello collegues,

 

I saw the process have an script to generate a MSWord Printable, I need to get one to generate a FastReport printable, somebody can help?

 

The code in this case to MSWord printable is 

var reportService = new Terrasoft.Configuration.ReportService.ReportService();
Terrasoft.Configuration.ReportService.ReportData report = reportService.GenerateMSWordReport(
    (PrintableId.ToString()), ObjectId.ToString(), ConvertToPdf);
var entity = UserConnection.EntitySchemaManager.GetInstanceByName("labQuoteFile");
var fileEntity = entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("labQuoteId", QuoteId);
fileEntity.SetColumnValue("TypeId", AttachmentType);
fileEntity.SetColumnValue("Name", FileName);
fileEntity.SetColumnValue("Data", report.Data);
fileEntity.Save();
return true;

Thanks in advance

Like 0

Like

1 comments

Hello Julio,

 

I've noticed that you've already found the solution to this question in terms of this community post. Please specify if additional help is needed in this thread.

 

Thank you!

 

Best regards,

Oscar

Show all comments

Dear Community,

 

We have added a new icon to the communication panel. We would like to disable click for users and also add a tool tip to display the hints to the user when they hover over the icon. Any help here will be great!

Thanks in advance!

Like 0

Like

5 comments

Hello Shivani,

 

There are three different ways to add a hint depending on your control type. Try which one will work for you:

 

"tip": {

"content": {

"bindTo": "Resources.Strings.CustomerBillingInfoTip"

}

},

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

"hint": {

"bindTo": "Resources.Strings.GlbUseInternetTip"

},

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

"controlConfig": {

"tips": [

{

"tip": {

"content": {"bindTo": "Resources.Strings.GlbUseInternetTip"}

},

"settings": {

"displayEvent": this.Terrasoft.controls.TipEnums.displayEvent.CLICK

}

}

]

}

 

To disable "click" behavior you can override a "click" method, like so: 

"click": {"bindTo": "onExampleButtonClick"}

 

Best regards,

Bogdan S.

Thank you Bogdan! The tool tip works. However, to disable the click (prevent opening communication panel module), I returned empty function in onExampleButtonClick(). This is opening up a blank side panel. Is there a way we can disable clicking itself? If I dont give return empty function, there are errors in the console.

Shivani Lakshman,

 

If you don't want users to click it you can simply hide this action using the "visible" parameter in the diff of the module. Like on the example below:

{
				"operation": "insert",
				"index": 10,
				"parentName": "communicationPanelContent",
				"propertyName": "items",
				"name": "testCTIModule",
				"values": {
					"tag": "testCTIModule",
					"visible": {"bindTo": "testCTIModuleVisible"},
					"imageConfig": {"bindTo": "testCTIModuleImageConfig"},
					"caption": {"bindTo": "testCTIModuleCaption"},
					"generator": "CommunicationPanelHelper.generateMenuItem"
				}
			}

You can return false in the testCTIModuleVisible attribute and hide the action or create a function that will hide it for some users.

 

Or you can override the onMenuItemClick function and if the selectedItemTag variable is your custom CTI panel action then return false in this function.

 

Best regards,

Oscar 

Oscar Dylan,

Thanks Oscar. The purpose of this icon is to just notify the users of a particular event which happens when we get a notification through API. Since the communication panel is visible throughout the platform, irrespective of the section the user is currently at, we have added this icon as a notification. Therefore we need it to be visible when the said event occurs but prohibit users from clicking it. Is that possible?

Shivani Lakshman,

 

Then you need to perform the modification of onMenuItemClick function as I mentioned in the previous post. Please debug its logic and add your own CTI panel element to the function logic modification.

 

Best regards,

Oscar

Show all comments

In the Contacts section, I need to filter all the contacts that ever got emails Titled "Thanks" (NOT bulk emails, just simple emails). These emails are displayed here:

I tried any available lookup, yet no success. Which object should be used?

Like 0

Like

6 comments

Maybe like this. But I'm not sure.

https://prnt.sc/z38p5x

That's Participant instead of Owner.

Dear Yuriy, 



The option proposed by Julius above should work for the described purpose. 

Please use Email Participants object to get list of contacts which were in the needed bulk email's audience.



Kind regards,

Roman

Julius,

Thank you! I specified the question: NOT bulk emails, but simple emails

Dear Yuriy, 



In this case you need to build filter like this:



Kind regards,

Roman

Roman Brown,

Roman, that doesn't work for me! That gives only a few contacts. For instance, Darren is not among them. I suspect the contacts don't have activities, just emails. What table stores the emails?

Yuriy Konstantinov,

Activities and emails are stored in the same object, but just in case try to remove type=email filter and check if it helps. 

 

Best regards,

Angela

Show all comments