Hi community,

 

All the time I opened  any section in creatio mobile app some lookup fieds shows as Not Loaded. Please see the below screenshot.

 

This is just one field in the screenshot but it shows like this for 5 lookup fields out of say 10 lookup fields.

 

Can anyone say something about what is reason behind this and how it can be fix?

 

Many Thanks,

 

Akshit

Like 0

Like

1 comments

Dear Akshit,

 

I would recommend you to contact support regarding this issue - they should be able to help. 

 

Best regards,

Angela

Show all comments

Hi Community,

 

I need to hide the Export to Excel option for Details present on the record edit page for all users except for Specific users like Supervisor.

 

However I have asked this question earlier and Ryan has replied to that and that works fine as well. But now the situation is that this is to be done for specific users.

https://community.creatio.com/questions/how-hide-standard-actions-details-record-edit-page

 

Please tell me how to achieve this functionality

 

Many Thanks!

Akshit.

Like 0

Like

2 comments

Hello Akshit,

To hide for specific users only, you can add something like the following to the detail schema's methods:

getExportToExcelMenuVisibility: function() {
    // first make sure it's not already hidden due to operation permissions
    var baseVisible = this.callParent(arguments);
    if (!baseVisible) {
        return false;
    }
 
    // now you can return true or false to show/hide for current user
    return true; // or return false to hide for the current user
},
getDataImportMenuItemVisible: function() {
    // first make sure it's not already hidden due to operation permissions
    var baseVisible = this.mixins.FileImportMixin.getDataImportMenuItemVisible.apply(this, arguments);
    if (!baseVisible) {
        return false;
    }
 
    // now you can return true or false to show/hide for current user
    return true; // or return false to hide for the current user
}

However, note, only go this route with code if you need to limit this capability in this specific detail only. If you're wanting to remove this from everywhere in the app, then using the operation permission as Julio mentioned in your other post is the right approach.

Ryan

Hello Akshit,

 

I've achieved the result needed using the following scenario:

 

1) Create an operation permission with "CanExportDataOnCustomDetail" code:

Here we will specify the list of users or roles who will be able to export data from our custom detail.

 

2) Create a detail in the contacts section with the following schema of the detail (not the detail page, but detail itself):

define("UsrSchemafd43c0a7Detail", ["RightUtilities"], function(RightUtilities) {
	return {
		entitySchemaName: "UsrContactCaseDetailV2",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
      	attributes:{
          "CanExportDataOnCustomDetailAtt":{
            dataValueType: Terrasoft.DataValueType.BOOLEAN,
            type: this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
            value: false
          }
        },
		methods: {
          init: function() {
                this.callParent(arguments);
                this.checkOperationPermission();
            },
          checkOperationPermission: function () {
            var operationsToRequest = [];
            debugger;
            operationsToRequest.push("CanExportDataOnCustomDetail");
            RightUtilities.checkCanExecuteOperations(operationsToRequest, function(result) {
                    if (result) {
                      	this.set("CanExportDataOnCustomDetailAtt", result.CanExportDataOnCustomDetail);
                      	console.log("result.CanExportDataOnCustomDetail: "+result.CanExportDataOnCustomDetail);
                    }
                }, this);
          },
          getExportToExcelMenuVisibility: function (){
            if (this.get("CanExportDataOnCustomDetailAtt")===true){
              return true;
            } else {
              return false;
            }
          }
        }
	};
});

Please note that debugger and console.log are not needed here, they were added just for testing the code.

 

As you can see the key actions here are:

 

- calling RightUtilities and checking if the user has operation permission rights for "CanExportDataOnCustomDetail" operation (the one that we've created at step 1)

- setting the "CanExportDataOnCustomDetailAtt" attribute value based on the RightUtilities check in the checkOperationPermission function

- using the "CanExportDataOnCustomDetailAtt" attribute value so to call getExportToExcelMenuVisibility method correctly due to our business task

 

As a result once the system user or role is added to the operation permission they will be able to see the "Export to Excel" button in the detail actions.

 

Best regards,

Oscar

Show all comments

Hi Community,

 

I need to hide the Export to Excel option for Details present in record edit page.

 

Like in the above screenshot, Previous PO/WO for the selected Project Details There is and option for Export to Excel & Data Import which I need to hide.

 

I have got this article : https://community.creatio.com/questions/how-hide-or-remove-actions-section

 

and it's working fine on sections.

 

Please tell me how to approach it!

 

Many Thanks,

Akshit.

Like 0

Like

8 comments

Hello Akshit,

You can add the following to the methods of the detail schema:

getExportToExcelFileMenuItem: Terrasoft.emptyFn,
getDataImportMenuItem: Terrasoft.emptyFn,

Ryan

Also, in this case, you can go to "Operation Permissions" and restrict the export functionality to specific roles, see "CanExportGrid" Operation permission.

 

On Creatio 7.17, also in the Business Rules of any section you can restrict tabs, objects, groups and so on, see at https://prnt.sc/vpzsq0 and https://prnt.sc/vpzttn

 

I suggest to use LOW-CODE tools of Creatio, avoid developing if Creatio have tools to solve what you need.

@Akshit, to avoid import, you need to edit "CanImportFromExcel" Operation Permission and configure the roles who must have permissions to import, by default just System Administrators

Hi Ryan Farley,

 

Thanks for the solution. It works.

 

But one more question I need to hide these options only for specific users, say for all the users except Supervisor these Export to Excel option should not be visible.

 

How can I achieve this? 

Hi Julio.Falcon_Nodos,

 

Thank you for you response but I see nothing like "CanImportFromExcel" or "CanExportGrid" Operation permission 

 

 

Application version is 7.16.3

Hi Akshit,

 

FYI you are filtering the "CanImportFromExcel" and "CanExportGrid" Operation Permission by Name column rather than it should filter by Code column. Please find the below screenshot for more information.

 

 

 

Many Thanks!

Sarthak Jain

 

Akshit,

 

You must select  "code" field, you are looking the Name

Hello Akshit,

 

Please see my comment at https://community.creatio.com/questions/specific-user-how-hide-standard…

 

This is exactly what you need.

 

Best regards,

Oscar

Show all comments

Hi Community,

 

I am trying to update the fields for my section called payment request. Please see the code below 

 

this.showInformatinDialog(result.success + "\n" + result.message); // for checking the status of update query execution

 

I am getting false for result.success. Please see the below screenshot.

 

I wrote the same code for other sections and it working fine for all other sections.

 

Please help me with this.

 

Many Thank.

 

Akshit.

 

Like 0

Like

2 comments

First, I believe that the response includes response.errorInfo which you can check for any error messages. Second, if you look in the browser dev tools in the network tab, you should see the request there and you can look at the response to see if any messages provide any insight as to what is happening (as well as any errors in the console). Start there to see if there is any indication of what is going wrong. Nothing sticks out as incorrect in the code at first glance.

Ryan

Hi Akshit, 

 

Please review Ryan's reply above and debug the code firstly. Please check if specific requests sent in the network tab return any errors and also check for the result from the debugger. 

 

Regards, 

Anastasiia

Show all comments

Hi All,

 

I have a use case to display a field containing values updating dynamically by querying the data from another table. And display the data in the calendar section page container similar to setup up the summary calculation.

 





Similar to the below image which shows total number of products and total cost in order page.

I need to implement this functionality in the calendar section page by calculating the value from another table (say, any integer field in Contact section).



How to implement this functionality?



Regards,

Adharsh S



 

Like 0

Like

3 comments

Hello Adharsh,

 

You need to add label control element to "SeparateModeActionButtonsRightContainer" container in ActivitySectionV2 and define logic to calculate its value.

 

Best regards,

Bogdan S.

 

 

Bogdan Spasibov,



When I tried with "SeparateModeActionButtonsRightContainer" . 

Since I have more buttons in that container, it getting overflowed. I need to create this label near the Tag in the filterContainer. When I tried to add in the "FiltersContainer". Its getting hidden as shown below. Can you help me with it, by showing the label in the filtercontainer?





 

Hi Adharsh,

 

It seems that your issue is that you are trying to occupy the space already reserved for the out-of-the-box filter module, so your fields are pushed out of its container. Please read my message here about this block: 

 

https://community.creatio.com/questions/fixed-filter-blocking-multiple-…

 

You can use the same strategy, but, as I've mentioned in my message, Creatio R&D team highly disrecommend our clients affecting this part of the system somehow. 

 

Instead, you can easily set your fields under the filter container. Here is the code example of how you can do it:

 

define("ActivitySectionV2", [],
  function() {
    return {
      entitySchemaName: "Activity",
      messages: {},
      attributes: {
        "MyField1": {
          dataValueType: Terrasoft.DataValueType.TEXT,
          type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
          value: "MyField1Value"
        },
        "MyField2": {
          dataValueType: Terrasoft.DataValueType.TEXT,
          type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
          value: "MyField2Value"
        }
      },
      methods: {},
      diff: [{
        "operation": "insert",
        "parentName": "FiltersContainer",
        "propertyName": "items",
        "name": "MyContainer",
        "values": {
          "itemType": Terrasoft.ViewItemType.CONTAINER,
          "id": "MyContainer",
          "wrapClass": ["filter-inner-container", "custom-filter-button-container"],
          "items": [{
              "name": "MyField1",
              "bindTo": "MyField1",
              "caption": "MyCaption1"
            },
            {
              "name": "MyField2",
              "bindTo": "MyField2",
              "caption": "MyCaption2"
            }
 
          ]
        }
      }]
    };
  });

 

Regards,

Anastasiia

 

Show all comments

Is there a custom HTML control in Creatio that I can use to build a tree hierarchy and visualize it in the UI? The input parameter to the control will be a single node that could be at any position in the tree. The logic should query the database for the links to traverse upwards and downwards from the said node to complete the tree.

 

Is there already a control in Creatio that can be repurposed for this use-case?

 

Thanks in advance...

Like 0

Like

1 comments

Hello,

 

You can find an example in the Advanced Settings => Package Dependencies tab.

There is also another one in the Account section, Account page => Connected To tab.

 

Best regards,

Bogdan S.

Show all comments

Hi Community,

 

Below  is the business rule I need to apply

 

Below is the code I wrote 

 

This doesn't work in mobile app but it also is not throwing any error.

 

Can anyone help me with this issue!

 

Many Thanks,

 

Akshit.

Like 0

Like

1 comments

Hi Akshit,

 

Here is an example of the code that has perfectly worked on my end:

Terrasoft.sdk.Model.addBusinessRule("Case", {
    name: "Make UsrStringField column required",
    ruleType: Terrasoft.RuleTypes.Custom,
    triggeredByColumns: ["UsrBoolAct"],
 
    events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],
 
    executeFn: function(record, rule, column, customData, callbackConfig) {
    	var isRequired;
    	var isActivated = record.get("UsrBoolAct");
    	if (isActivated===true){
    		isRequired=false;
    	} else {
    		isRequired=true;
    	}
        record.changeProperty("UsrStringField", {
            isValid: {
                value: isRequired,
                message: "Column must be filled in"
            }
        });
 
        Ext.callback(callbackConfig.success, callbackConfig.scope, [isRequired]);
    }
});

The logic here is that the "UsrBoolAct" column is true (this is a boolean column) then the "UsrStringField" should be filled in. After the application pool was restarted this output was received:

Please also note that wen workig with lookups instead of booleans such a construction will help to achieve the result needed:

var type = record.get("Type");
        if (type && (type.get("Id") === Terrasoft.ContactTypes.Doctor ||
                type.get("Id") === Terrasoft.ContactTypes.ContactPerson))

Best regards,

Oscar

Show all comments

Hi Community,

 

I want to apply the below business rule in mobile app

 

Below is the code I have written in the module : 

 

Below is the error I received when I logged in with other user(User other than mention in the code):

 

Requesting you help me to figure out the issue!

 

Many Thanks,

Akshit.

Like 0

Like

1 comments

Hello Akshit,

 

Hope my message finds you well.

 

Please restart the application pool in IIS if this is an on-site solution or contact us at support@creatio.com if this is a cloud app. Also please try to flush the web browser cache and cookies.

 

Also, what is the behavior when you log in as the user mentioned in the code?

 

Thanks in advance.

 

Best regards,

Roman

 

 

 

Show all comments

Hi Community,

 

I have created a custom package and added all the necessary modules required for applying business rules in it.

 

 

I have then created a custom module with the business rule and added this module inside the ModelExtension attribute of required model[UsrPurchaseOrders] in MobileApplicationManifestDefaultWorkplace.

 

Business rule : 

 

Please help me with this issue.

 

Many Thanks.

 

Akshit

 

Like 0

Like

1 comments

Hello Akshit,

 

I've used the same code on my side:

Terrasoft.sdk.Model.addBusinessRule("Case", {
    ruleType: Terrasoft.RuleTypes.Activation,
    events: [Terrasoft.BusinessRuleEvents.Load, Terrasoft.BusinessRuleEvents.ValueChanged],
    triggeredByColumns: ["UsrContact"],
    conditionalColumns: [
        {name: "UsrContact", value: "c4ed336c-3e9b-40fe-8b82-5632476472b4"} //Andrew Baker
    ],
    dependentColumnNames: ["UsrStringColumn"]
});

and the logic is that if the contact specified in the UsrContact column is not Andrew Baker (sample) then the UsrStringColumn column should be deactivated. And the only difference between our scenarios is that the application pool for the app should be restarted once you apply all the changes in your custom module and include this module into the manifest. So please restart the application pool in IIS if this is on-site app or contact us at support@creatio.com if this is a cloud app. On my side the rule works as expected (using 7.16.4 version):

Best regards,

Oscar

Show all comments

Following this post  I was able to set most fields i needed to rich text however no matter what I try the case description field will not change to rich text. Any ideas on what to try to make it rich text?

Like 0

Like

8 comments
Best reply

Hi Michael,

I've found that if your element in the diff is a merge, changing the contentType doesn't always work. Since the case description is a field that already exists on the case page, I assume it's in the diff with "operation": "merge". Try this instead, delete the description field from the page, then re-add it again. Now, it will show as an insert in the diff. Add your

"contentType": Terrasoft.ContentType.RICH_TEXT

and it should now work.

 

Ryan

Hi Michael,

I've found that if your element in the diff is a merge, changing the contentType doesn't always work. Since the case description is a field that already exists on the case page, I assume it's in the diff with "operation": "merge". Try this instead, delete the description field from the page, then re-add it again. Now, it will show as an insert in the diff. Add your

"contentType": Terrasoft.ContentType.RICH_TEXT

and it should now work.

 

Ryan

Ryan Farley,

Your solution worked, Thanks

 

 

Ryan Farley,

Thanks Ryan, I have the same problem. In the merge element to this field, I modify my DIFF block to the Symptom column, but nothing happens in the app, it continue receiving data as clear text, not Rich Text

The whole block I have for this field in my DIFF is:
{ // JFALCON, enable Rich Text?
	"operation": "merge",
	"name": "Symptoms",
 
	"contentType": this.Terrasoft.ContentType.RICH_TEXT,
	"controlConfig": {
		"imageLoaded": {
			"bindTo": "insertImagesToNotes"
		},
		"images": {
			"bindTo": "NotesImagesCollection"
		}
	},
	"values": {
		"layout": {
			"colSpan": 24,
			"rowSpan": 3,
			"column": 0,
			"row": 1
		},
		"enabled": true,
		"labelConfig": {
			"visible": true
		}
	}
},	 // FIN	

What could be wrong?

 

 

Hello Julio,

Changing the content type for a merge in the diff never seems to work for me. The only way I can get this to work for existing fields such as Symptoms is to remove the out of the box field from the page, then re-add it again. This way, it's no longer a merge and instead an insert (which does work).

Ryan

Ryan Farley,

Thanks Ryan, it didn't works to me :-(, so I open a Ticket with Creatio support, they are testing, you can see what I'm getting now here https://prnt.sc/YafjMFjshHdJ, they change the DIFF code I had by this one, but not results

			{
				"operation": "insert",
				"name": "Symptoms14a57ab4-4b0f-42ff-a61a-467308dff56d",
				"values": {
					"layout": {
						"colSpan": 24,
						"rowSpan": 3,
						"column": 0,
						"row": 1,
						"layoutName": "CaseInformation_gridLayout"
					},
					"bindTo": "Symptoms",
					"enabled": true,
					"tip": {
						"content": {
							"bindTo": "Resources.Strings.Symptoms14a57ab44b0f42ffa61a467308dff56dTip"
						}
					}
				},
				"parentName": "CaseInformation_gridLayout",
				"propertyName": "items",
				"index": 1
			},

They delete your suggestions, fragment

	"contentType": this.Terrasoft.ContentType.RICH_TEXT,
	"controlConfig": {
		"imageLoaded": {
			"bindTo": "insertImagesToNotes"
		},
		"images": {
			"bindTo": "NotesImagesCollection"
		}
	},

 

Also I have a rowSpan = 3, and I had just oine line...

 

I didn't understand what's wrong, as soon I had Creatio Support news I share them here to contribute

 

Thanks in advance

 

Best regards

Julio

Julio.Falcon_Nodos,

If you add this back in, make sure it is in the values part. It should look like this: 

{
   "operation":"insert",
   "name":"Symptoms14a57ab4-4b0f-42ff-a61a-467308dff56d",
   "values":{
      "layout":{
         "colSpan":24,
         "rowSpan":3,
         "column":0,
         "row":1,
         "layoutName":"CaseInformation_gridLayout"
      },
      "bindTo":"Symptoms",
      "enabled":true,
      "contentType":"this.Terrasoft.ContentType.RICH_TEXT",
      "controlConfig":{
         "imageLoaded":{
            "bindTo":"insertImagesToNotes"
         },
         "images":{
            "bindTo":"NotesImagesCollection"
         }
      }
   },
   "parentName":"CaseInformation_gridLayout",
   "propertyName":"items",
   "index":1
}

Note, I removed the tip since I don't know if that is supported for rich text fields.

I have an article on this topic here that might help: https://customerfx.com/article/adding-custom-rich-text-editors-to-a-pag…

Ryan

Thanks Ryan, I already see the code must be inside Values... I corrected and works

Ryan Farley,

Thanks, Ryan another question regarding this.

 

In the case registration where I'm implementing the rich text to Case Description, it just works when I register a case manually, and paste a rich text to Case description.

 

But when I receive an email to open a case, the email body is not stored in Rich text, at least with the implemented configuration.

 

What else need to configure to enable email body store in rich text in Case Description?

 

Thanks in advance

 

Best regards

Show all comments