I am trying to hide/show print button based on the field Data. I tried to override SeparateModeReportsButton, CombinedModeReportsButton in Diff but It didn't work. Any luck in finding the solution for this

Like 0

Like

1 comments

Hello,



In order to hide/show the "Print" button based on role you need to modify the method setReportsButtonVisible in the schema BaseDataView and set the value of an attribute "IsSectionPrintButtonVisible" based on your condition.



For example, here is a full code of the schema BaseDataView where we hide the "Print" button if the user is not a System Administrator (id 83a43ebc-f36b-1410-298d-001e8c82bcad):

  define("BaseDataView", [], function() {

        return {

            diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,

            methods: {

                setReportsButtonVisible: function() {

                    this.callParent(arguments);

                    this.set("IsSectionPrintButtonVisible", false);

                    var currentUserId = Terrasoft.SysValue.CURRENT_USER.value;



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

                        rootSchemaName: "SysAdminUnitInRole"

                     });

                    var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "SysAdminUnit", currentUserId );

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

                                                                          "SysAdminUnitRoleId", "83a43ebc-f36b-1410-298d-001e8c82bcad");

                

                    esq.filters.logicalOperation = Terrasoft.LogicalOperatorType.AND;

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

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

                    esq.getEntityCollection(function (result) {

                        if (result.success) {

                            this.set("IsSectionPrintButtonVisible", true);

                        } 

                        else {

                            this.set("IsSectionPrintButtonVisible", false);

                        }

                    }, this);

                }

            }

        };

    }

);





Best reBest regards,

Orkhan Gojaev

Show all comments

Hello Community,

In the Mobile app there is no trace of the Filters in the Sections (Accounts, Contacts)

Filters seem to appear only in the Activities Section.

How should i add the filter (icon and functionality) to the most used Creatio sections (Accounts,Contacts) etc ?

Best regards,

Sasori

Like 0

Like

4 comments

Hello,

 

Filters are present in sections Accounts and Contacts in mobile applications in the latest versions.

Please try updating your mobile application to the latest available version.

If it doesn't fix the issue, please email us at support@creatio.com and we will check the matter for you.

 

Best regards,

Yuliya Gritsenko

Hello Yuliya Gritsenko,

Could you please let us know Why filter icon is not showing in the Mobile applications freedom UI?

 

Prem Kumar,

 

Please make sure that your mobile application is updated to the latest available version.

However if after the update the issue is still present, you should contact our support team directly at support@creatio.com so we could analyze the issue on your environment.

Mira Dmitruk,

 

Yes we are using the updated mobile application.
We have a requirement in the mobile application customized section to filter the records in the mobile we doesn't have the filter icon to filter the section in the freedom UI. 
Please help us to solve the issue.

 

 

Here we can see the two buttons like Case ID sorting and Folders but we dont have the filter icon in the mobile freedom UI

Show all comments

I want to create a custom Business process element as shown in in the below image. How can I implement this?

 

 

Like 1

Like

2 comments

Hello Pavan, 



Below, I have shared documentation to help you with this question: 



https://academy.creatio.com/docs/developer/development_tools/creatio_id…



Best regards,

Orkhan Gojaev

Hi Orkhan,

Documentation you have shared is regarding custom user task. can we create a custom element in Business process just like send email element, approval shown in picture. and add my custom element in this list.



Thanks in advance.

Regards,

Manideep

Show all comments

Hello,

 

I was creating an edit page for my Custom Lookup by following the https://customerfx.com/article/creating-an-edit-page-for-a-lookup-in-creatio/.

I am not able to Find SQL Executor as that add on has been depreciated. Can I run the SQL code in "SQL Script" Element and if not what is the best way to do? Please advice.

 

 

Like 0

Like

1 comments

Hello,

 

Please note that if your instance is deployed locally, you can run SQL scripts directly in the database. If your site is located in our Cloud, you can just contact our Support team at support@creatio.com directly and send the scripts that you need us to run on your site.

Show all comments

Hello,

As a part of the contact object I have two different types of email communication options a) The Regular OOTB email field and b) newly added 'Communication Option' of type 'email' called "Corporate Email"

How can I specify the system to use the email id in the "Corporate Email" field for bulk emails and for trigger emails and not utilize the value in the OOTB email column while sending out bulk emails or when running marketing campaigns?

Like 0

Like

0 comments
Show all comments

Hi community,

How may we implement the “items:” in our custom detail to display the items count as in the product in order detail?

Furthermore, how can I get the number of currently displayed detail items and the total detail items respectively in the method of detail's client module?

 

Many thanks,

Andrew

Like 0

Like

1 comments

Hello Andrew,

 

Just review how the logic of the summaryCountValue, summaryCountCaption and updateSummary method is implemented in the OrderProductDetailV2 schema and perform the same setup in your detail. You only need to debug the logic execution, all the logic is client-side.

Show all comments

Is it?

Like 0

Like

1 comments

Greetings,



Yes! You may ask us any testing related question on the Community page.

Feel free to contact us at any time.

Show all comments

Hello community:



I'm defining a rule inside the section code schema to remove spaces from a field value when the user tries completes the field "UsrTexto1". It is defined as follows:

methods: {
    cambioTexto1: function() {
        var vueltas = this.get("Vueltas");
        this.set("Vueltas",vueltas+1);
 
        var txt1 = this.get("UsrTexto1");
        if (txt1.includes(' ')) {
            var txt2 = txt1.replaceAll(' ','');
            this.set("UsrTexto1",txt2);
        }
    },
}

So when the field is modified it searches for spaces inside the text and removes them. This is an example of execution:

1) When the user types the text value

2) After the method is executed:

 

The problem is that the function is executed too many times. I've added a counter 'vueltas' to show how many times the function is called and here it is the result:

It doesn't make sense as I think that the method should be called exactly 2 times (1st when it removes the spaces, and 2nd when the system detects new changes on the field and now there are no spaces). The main problem is that the whole operation is slowed down because of the high number of calls.

 

How can I fix this?

 

Thanks in advance!

Like 0

Like

5 comments

Hello,

Can you please clarify how exactly the cambioTexto1 method is called?

Thank you!

The issue is that every change made to the text results in it firing the function again, plus, the changed value won't be read by the function on subsequent calls due to the timing is that the function firing and the value changing, which is why it's getting called so many times (and likely exceeding out the call stack max).

 

Instead if firing the value on the change, maybe fire it on the blur (when the user exits the control). To do this, remove the change attribute for the control and add this to the values block for the control in the diff:

"blur": {
    "bindTo": "cambioTexto1"
}

Or you could do it on save before using callParent.

 

Ryan

Oleg Drobina,

Hello Oleg,

In the section page there is a field called "Texto1" (with the code UsrTexto1). Inside the code schema of that section is the method that I provided earlier.

As you may see the method is called cambioTexto1, which is compose of cambio ("change" in Spanish) and Texto1 (the name of the field). It means that Creatio internally calls that function each time the value of that field is modified (with a built-in trigger I guess).

Therefore, the method is always called automatically, I don't call it manually.

Thanks for your interest!

Ryan Farley,

That makes sense,



I will try that tomorrow and check if it solves the problem



Thanks for you help!

Ryan Farley,

Hi again,

 

I've tried with the solution you provided but I haven't been able to fix the issue yet.

 

I also took a look at and older post where you submitted the same solution. I've tried to follow the implementation as you suggest. Here I share the current code:

{
	"operation": "insert",
	"name": "STRINGe5cdab8a-f59c-4c1c-aa90-c412e4c3e5ae",
	"values": {
		"layout": {
			"colSpan": 24,
			"rowSpan": 1,
			"column": 0,
			"row": 1,
			"layoutName": "ProfileContainer"
		},
		"bindTo": "UsrTexto1",
		"enabled": true,
		"blur": {
			"bindTo": "cambioTexto1"
		}
	},
	"parentName": "ProfileContainer",
	"propertyName": "items",
	"index": 1
},

Note: I have also removed the attributes part as you mentioned.

The problem is that when I try to modify a register or create a new one this happens:

The page displays blank content and, as you can see on the browser console at the right, there is an error related to an undefined value.

The messages you see before the error are traces I added to see the variable values:

console.log("Vueltas: " + this.get("Vueltas"));
- Vueltas: 0
 
console.log("Modificado: " + this.get("Modificado"));
- Modificado: false
 
console.log("Value read: " + this.get("UsrTexto1"));
- Value read: undefined

I have already read the documentation for the client schemas and I still have no clue how to solve it.

 

Regards.

Show all comments

I am using mobile application, i am trying to download a files attached in documents attachments, i am able to see a documents is attached but unable to download it. In web version when you click on the attachment it automatically downloads. Is there any separate setting for that i am missing on.

Like 0

Like

1 comments

Hello Creatio Community,

I hope everyone is doing well. I'm reaching out to you because I'm experiencing an issue with a Usertask code in Creatio and I'm seeking your guidance and expertise in resolving it.

Here's the code snippet I've been working on:

namespace Terrasoft.Core.Process.Configuration

{

    using Newtonsoft.Json;

    using Newtonsoft.Json.Linq;

    using System;

    using System.Collections.Generic;

    using System.Collections.ObjectModel;

    using System.Globalization;

    using Terrasoft.Common;

    using Terrasoft.Core;

    using Terrasoft.Core.Configuration;

    using Terrasoft.Core.DB;

    using Terrasoft.Core.Entities;

    using Terrasoft.Core.Process;

    using Terrasoft.UI.WebControls.Controls;

    /* Required for logging to operate correctly. */

    using global::Common.Logging;

    /* Required for message sending tools to operate correctly. */

    using Terrasoft.Configuration;

    #region Class: UsrShowModalPageUserTask

    ///

    public partial class UsrShowModalPageUserTask

    {

        /* Set up logging.

        Create an individual logger. Record the logging results to the Common.log file. */

        private static readonly ILog _log = LogManager.GetLogger("UsrShowModalPageUserTask");

        /* Define the sender in the back-end. */

        private const string MessageSender = "UsrShowModalPageUserTask";

        #region Methods: Protected

        /* The business logic of the process task. */

        protected override bool InternalExecute(ProcessExecutingContext context) {

            /* Log the information level message. */

            _log.InfoFormat("UserTask works well. UsrDialogText = {0}, UsrCommaSeparatedReturnCodes = {1}", UsrDialogText, UsrCommaSeparatedReturnCodes);

            /* Create a message. */

            var messageData = new

            {

                /* The text in the dialog box. */

                UsrDialogText = UsrDialogText,

                /* The comma-separated button return codes. */

                UsrCommaSeparatedReturnCodes = UsrCommaSeparatedReturnCodes,

                /* The service parameter. The unique ID of the element instance within the process instance. */

                procElUId = UId

            };

            /* Serialize the message body object. */

            string messageBody = JsonConvert.SerializeObject(messageData);

            /* The message body sent from the back-end to front-end. */

            MsgChannelUtilities.PostMessage(UserConnection, MessageSender, messageBody);

            return false;

        }

        #endregion

        #region Methods: Public

        public override bool CompleteExecuting(params object[] parameters) {

            return base.CompleteExecuting(parameters);

        }

        public override void CancelExecuting(params object[] parameters) {

            base.CancelExecuting(parameters);

        }

        public override string GetExecutionData() {

            return string.Empty;

        }

        public override ProcessElementNotification GetNotificationData() {

            return base.GetNotificationData();

        }

        #endregion

    }

    #endregion

}

 

When I try to run the code, I get the following error message:

"The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)"

 

 

I've tried troubleshooting the issue on my own but haven't been successful so far. I'm wondering if anyone in the community has encountered a similar problem or has any suggestions on how to fix this issue.

 I appreciate any guidance or assistance you can offer.

Looking forward to your replies and insights.

Best regards,

 

Abderrahman TIGAMI

Like 0

Like

1 comments

Hello,

 

Please uncheck the 'Compile into a separate assembly' checkbox, in order to solve the issue 

image.png

Show all comments