Hi team,

 

I have made some fields read-only when I am creating the fields on the edit page. When I use the Open Edit Page element and try to add some values to other fields, the read-only fields also change as editable fields. I wanted to keep my read-only fields always not editable. How to resolve this issue.

 

Currency is Read-Only field as shown below

Its editable in Open-Edit-Page

Like 0

Like

1 comments

Hello,



Normally, Section wizard reflects the content from all the schemas up to the package indicated in the "Current package" setting.

However, UI reflects the content and logic from all the schemas of all the packages.

"Custom" package is dependent on all packages of the application (and should be the last one in the hierarchy), all columns are the same and are visible both on UI and in Section wizard once it's set as the current package.



I would suggest you check the "Current package" setting and parameters of column "Currency" on the pages in each package in the hierarchy.



Kind regards,

Alona

Show all comments

How to make a user access business processes without the ability to change anything?

 

The user should be able to view the settings of the process elements and flows, but not edit.

Like 0

Like

0 comments
Show all comments

Hi, community.

 

Is there a way to make a "Detail" read-only on mobile?

I need to hide the "Add" and "Delete" buttons in "Detail" according to some rules.

I know that in the web version we can do this with the code below:

 



 

getAddRecordButtonVisible: function() {return false; },          

editCurrentRecord: () => false,

getEditRecordMenuItem: Terrasoft.emptyFn,

getCopyRecordMenuItem: Terrasoft.emptyFn,

getDeleteRecordMenuItem: Terrasoft.emptyFn,

 





 

Thanks,

Tiago Pierine.

Like 0

Like

7 comments

Hi Tiago,

 

There is a getChangeModeOperations method for each page\view\gird controller and is specified in the following manner in the base page controller:

 

	getChangeModes: function() {
		var changeMode = this.getChangeMode();
		return Terrasoft.DataUtils.getChangeModeOperations(changeMode);
	},
 
	/**
	 * Returns change mode operations.
	 * @protected
	 * @return {Object} Change mode operations.
	 */
	getChangeModeOperations: function() {
		return this.getChangeModes();
	},
 
	/**
	 * Returns change mode bit mask.
	 * @protected
	 * @virtual
	 * @return {Number} Change mode bit mask.
	 */
	getChangeMode: function() {
		var detailConfig = this.getDetailConfig();
		var changeMode;
		if (detailConfig) {
			changeMode = detailConfig.changeMode;
		} else {
			changeMode = Terrasoft.sdk.Module.getConfig(this.self.Model).changeMode;
		}
		return Ext.isNumber(changeMode) ? changeMode : Terrasoft.ChangeModes.All;
	},

So you need to create a controller for your page and extend the method in the way like below (it's an example, should be tested and debugged):

 

getChangeModeOperations: function() {
   var detailConfig = this.getDetailConfig();
   if (detailConfig) {
      var parentRecord = detailConfig.parentRecord;
      if (parentRecord.get("IsNonActualEmail") === false) {
         return {
            canCreate: false,
            canUpdate: false,
            canDelete: false
         };
      }
   }
   return this.callParent(arguments);
}

Best regards,

Oscar

Oscar Dylan,

Hi Oscar, thank you very much for the answer, would you have any examples of how to create a controller of this type? The section that I am using on mobile for this case is "Account".

Hi Tiago,

 

Unfortunately we don't have any instructions on this matter, you need to study how base controllers are created and create one for your section.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar, 

 

This code below is it only works for standard details?

 

Terrasoft.sdk.Details.setChangeModes("Contact", "ActivityDetailV2StandartDetail", [Terrasoft.ChangeModes.Read]);

 

I am trying to do it work for Embedded Detail but it is not working like the example below:

 

Terrasoft.sdk.Details.setChangeModes("UsrTributRetPortDetail", "UsrSchemad37cf1aeDetailEmbeddedDetail", [Terrasoft.ChangeModes.Read]);



 Terrasoft.sdk.Details.setChangeModes("AccountAddress", "AccountAddressDetailV2EmbeddedDetail", [Terrasoft.ChangeModes.Read]);

 

 

Hi Tiago Martins Pierine, did you find the way to make the control with this functinoality?

 

Oscar can you tell us in what file you find the base code?

Federico Buffa ?,

Hi Federico, no, I couldn't get this to work.

Show all comments