Hi Team,

 

I have added one button in detail on clicking of which , it should be automatically navigated towards the next record in the detail. The records are displayed in tile view. Please refer to the screenshot.

 

 

I tried using the following options but they dont seem to work.

 

https://jsfiddle.net/SZKJh/

https://jsfiddle.net/SZKJh/1/

https://jsfiddle.net/r753v2ky/

 

Kindly help.

 

Thanks,

Sarika

Like 0

Like

7 comments
Best reply

Sarika Sharma,

 

Hi,

 

Ok, then something like this should be used:

onNewLineButtonClick: function(){
				var gridDataValue = this.getGridData();
				var gridDataItems = gridDataValue.getItems();
				var requestedActiveRow = this.get("RecordIndexColumn");
				if (requestedActiveRow != null) {
					if (requestedActiveRow >= gridDataItems.length) {
						return;
					}
					var targetActiveRowId = gridDataItems[requestedActiveRow].values.Id;
					this.set("ActiveRow", targetActiveRowId);
					var targetElementId = document.querySelector("[id*=" + CSS.escape(targetActiveRowId) + "]");
					$([document.documentElement, document.body]).animate({
						scrollTop: $("#" + CSS.escape(targetElementId.id) + "").offset().top
					}, 2000);
				}

RecordIndexColumn - is a virtual column where we specify the number of the record to which we should scroll (for example can be a separate field on the page or in the detail). This variable:

var targetElementId = document.querySelector("[id*=" + CSS.escape(targetActiveRowId) + "]");

searches for the detail record on the document (since each detail record has an Id value inside the Id selector of the element on the page).

 

This is not a ready code, but it animates the page to be scrolled to the active row visible in the document.

 

Best regards,

Oscar

Hi Sarika,

 

An example of such a button created for the AccountAddressDetailV2:

 

1) The button code itself:

{
				"operation": "insert",
				"name": "NewLineButton",
				"parentName": "Detail",
				"propertyName": "tools",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"className": "Terrasoft.Button",
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"tag": "NewLineButton",
					"caption": { "bindTo": "Resources.Strings.NewLineButtonCaption" },
					"click": {"bindTo": "onNewLineButtonClick"}
				}
			}

2) Creating an attribute:

attributes: {
			"ActiveRowIndex": {
				"dataValueType": this.Terrasoft.DataValueType.INTEGER,
				"value": 0
			}
		},

3) The code of the click handler:

onNewLineButtonClick: function(){
				var gridDataValue = this.getGridData();
				var gridDataItems = gridDataValue.getItems();				
				var activeRow = this.get("ActiveRow");				
				for (var i = 0; i < gridDataItems.length; i++) {
					if (gridDataItems[i].values.Id == activeRow) {
							this.set("ActiveRowIndex", i);
						}
				}				
				var currentActiveRowIndex = this.get("ActiveRowIndex");
				var newActiveRowIndex = currentActiveRowIndex + 1;
				var gridDataItemsLength = gridDataItems.length;
				if (newActiveRowIndex >= gridDataItemsLength) {
					return;
				}
				var targetActiveRow = gridDataItems[newActiveRowIndex].values.Id;
				this.set("ActiveRow", targetActiveRow);
			}

As a result after refreshing the page the button will do what is needed - navigation will be performed.

 

Best regards,

Oscar

Hi Oscar,

 

Thanks for your response.

 

I tried the code that you suggested and it is selecting the next record in the row on Clicking the Next Record Button. But the issue is I still have to manually navigate to see the next record that is selected. Kindly suggest me some way that the next selected record automatically gets visible on the screen without me having to scroll towards it.

 

Regards,

 

Sarika

Sarika Sharma,

 

Please clarify what do you mean? I thought you need a button that will select the next record in the grid. Do you want to open it or what? Please provide all the details of the task from the very beginning to the expected result.

 

Best regards,

Oscar

Hi Oscar, 

 

I want the functionality as follows:

As Soon as I click on the 'Next Record' Button, the next record should be automatically scrolled up and comes up in the view without me having to scroll the view of the window.

 

 

Please check the below link for making it clear.

 

https://jsfiddle.net/SZKJh/1/

 

As soon as a number is entered, and GO button is clicked, it redirects to the line with that number. I want the same redirection to occur on incremental basis.

 

Sarika Sharma,

 

Hi,

 

Ok, then something like this should be used:

onNewLineButtonClick: function(){
				var gridDataValue = this.getGridData();
				var gridDataItems = gridDataValue.getItems();
				var requestedActiveRow = this.get("RecordIndexColumn");
				if (requestedActiveRow != null) {
					if (requestedActiveRow >= gridDataItems.length) {
						return;
					}
					var targetActiveRowId = gridDataItems[requestedActiveRow].values.Id;
					this.set("ActiveRow", targetActiveRowId);
					var targetElementId = document.querySelector("[id*=" + CSS.escape(targetActiveRowId) + "]");
					$([document.documentElement, document.body]).animate({
						scrollTop: $("#" + CSS.escape(targetElementId.id) + "").offset().top
					}, 2000);
				}

RecordIndexColumn - is a virtual column where we specify the number of the record to which we should scroll (for example can be a separate field on the page or in the detail). This variable:

var targetElementId = document.querySelector("[id*=" + CSS.escape(targetActiveRowId) + "]");

searches for the detail record on the document (since each detail record has an Id value inside the Id selector of the element on the page).

 

This is not a ready code, but it animates the page to be scrolled to the active row visible in the document.

 

Best regards,

Oscar

Hi Oscar,

Many thanks for your response,

 

I tried the code you've provided above but it seems it is not reflecting any changes or action performed on the screen. I also configured the field "RecordIndexColumn" in section and added incrementing values in each of the records.

 

Sarika Sharma,

 

Hi,

 

It works correctly (almost, it should be modified a little since there is a problem with the MainHeaderSchemaContainer module at the top and the animation of the record (MainHeaderSchemaContainer sometimes can cover the actual record that is the first or the second in the detail list)). Also an example was provided for the AccountAddress detail and the "New line" button there). See the result:

Best regards,

Oscar

Show all comments

Hi Team,

How to upload a image in creatio, and reuse that Image with url in creatio UI.

 

Thanks

Like 0

Like

3 comments

Hello,

 

Could you please specify the exact place (, detail, record, etc)?



What is your business task?



Best regards,

Bogdan

Hi,

In portal section need to show company image logo,So need to upload a image to creatio and reuse in portal section using add web page option.Image not in any pubic network,it exists in local system now so trying to upload it to creatio. Hope You understand the requirement.

 

thanks

ssadula,

 

In order to display a custom image on the portal main page. It can be a banner that conveys the style and spirit of your company. Configure the banner as a separate web page. Create a separate web page on your website similar to the default banner on the portal to display a custom image.

To do this:

  1. Click  → “Set up portal main page.”

  2. Click  → [ Edit ].

  3. Double-click the “Website with image” block.

  4. Specify the title, the page URL, and styles (optional).

  5. Save the changes.

Best regards,

Bogdan

Show all comments

Hi Team 

 

We are trying to generate notification Using Academy Article as everything shows successful but no notification was generated

 

https://academy.creatio.com/documents/technic-bpms/7-11/how-set-push-notifications-mobile-application-users

 

 

For Approval we tried adding section to mobile but nothing was found in section

 

 

 

These are only option available can anyone suggest some workaround over this

 

Thank You So Much

 

Like 0

Like

5 comments
Best reply

Hello Braj,

 

I'll share here the answer that I provided regarding the approvals case so the community has access to this information as well.



In order to be able to use approvals in the mobile app you would need to follow these steps:



1) You need to run the 3 scripts that will be at the end of the message. This will enable some features needed for this functionality.



2) Then you need to flush (clear) the cache of the Redis server and restart the pool application of the site. 



3) Before adding the approval detail to a section in the Mobile application wizard, you need to make sure that approvals are enabled for this section in the main Creatio site. In order to do that, you need to open the Section wizard at the desired section, and you will see the possibility to enable approvals for this section.



4) Then you can open the Mobile application wizard and open the desired workplace. There you can open the desired section,  select "Details setup" and click on "New detail". There you will be able to select the Type, and here is where you can select the approval that you desire.



After that you can log out and log in at the mobile app, and verify the changes.

 

DECLARE @featureCode varchar(max) = 'UseMobileApprovals',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

DECLARE @featureCode varchar(max) = 'UseMobileApprovalPushNotifications',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

DECLARE @featureCode varchar(max) = 'UseMobileFlutterApprovals',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

Best regards,

Dariy

 

 

Hello,

 

We have already a corresponding case from you for our support team. 

 

We will update you there.

 

Best regards,

Bogdan

Bogdan,

Hi Bogdan,

 

It has been 20 days.

Please do check over this as client is escalating this

 

Thank You

Braj Raj singh Kushwaha,

 

hope this finds you well.

 

Unfortunately, we are unable to investigate this issue without having access to the instance. We have requested external access from you but never heard back. Kindly get back to us with the external access provided so that we could look into this.

 

Best regards,

Anastasiia

Hello Braj,

 

the notifications weren't working because the feature UseMobilePushNotifications wasn't enabled. After activating it, I have tested the business process and I could succesfully receive a push notification.

 

Best regards,

Dariy

Hello Braj,

 

I'll share here the answer that I provided regarding the approvals case so the community has access to this information as well.



In order to be able to use approvals in the mobile app you would need to follow these steps:



1) You need to run the 3 scripts that will be at the end of the message. This will enable some features needed for this functionality.



2) Then you need to flush (clear) the cache of the Redis server and restart the pool application of the site. 



3) Before adding the approval detail to a section in the Mobile application wizard, you need to make sure that approvals are enabled for this section in the main Creatio site. In order to do that, you need to open the Section wizard at the desired section, and you will see the possibility to enable approvals for this section.



4) Then you can open the Mobile application wizard and open the desired workplace. There you can open the desired section,  select "Details setup" and click on "New detail". There you will be able to select the Type, and here is where you can select the approval that you desire.



After that you can log out and log in at the mobile app, and verify the changes.

 

DECLARE @featureCode varchar(max) = 'UseMobileApprovals',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

DECLARE @featureCode varchar(max) = 'UseMobileApprovalPushNotifications',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

DECLARE @featureCode varchar(max) = 'UseMobileFlutterApprovals',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

 

Best regards,

Dariy

 

 

Show all comments

Can we fill and submit a form of another website using Creatio Landing Pages?

e.g. if the user clicks a button, the fields of a landing page form are automatically populated with creatio values

Like 0

Like

1 comments

Hello,

 

Thank you for your question.

 

Yes, it's possible, but could you please elaborate a little more on your task? Also, where is this button going to be located? In Creatio or on the landing?

 

Best regards,

Anastasiia

Show all comments

Hi All,

 

I am looking for feasibility of developing source code using Visual Studio Online. We have our instance on Cloud and due to security reasons, cannot take the backup and install on local. Looking for an alternate way of developing source code with the provision to debug.

 

Like 0

Like

3 comments

Hello,

 

Thank you for your question.

 

Unfortunately, customers don't have access to the file system of cloud instances due to security reasons.

 

Best regards,

Anastasiia

Anastasiia Lazurenko,

Can you suggest any alternative to work on it. We want to develop some custom API code to a site hosted on cloud and to ensure proper development support with option to debug, we need an environment to build it.

 

Appreciate your valuable input.

 

Anupama,

 

There are several options here:

1. You can take an anonymized copy of the cloud instance and deploy it on-site for development. This kind of copy doesn't contain user data so it's quite secure. To get this kind of copy, please contact Creatio support.

2. Perform a development on your clean on-site instance and deliver the changes to the cloud-based instance via packages and/or file transfer (request to support for changing config files)

 

Best regards,

Bogdan S.

Show all comments

Hi team,

 

When my screen resolution is @ 90% then see the below screenshot : 

 

But when screen resolution is @ 100 % then : 

 

Can anyone please help me to understand why it is happening?

More Information : Field in front of "Other" checkbox have hidden title. 

 

Many thanks in advance!

Like 1

Like

1 comments

Hello Akshit, 

The mentioned issue may occur if you have located the fields too close to each other in the Section wizard. 

I would like to suggest you to double-check how the fields are placed in the Section Wizard and make sure there is at least one "cell" of free space between them as on the attached screenshot:

If needed, please apply the changes, save them and re-login to the instance. The issue should not persist.

Should you have any questions, please let us know!

Best regard,

Anastasiia

Show all comments

Hi All, 

I have a requirement to restrict the user from uploading or deleting attachments once a particular date is reached. I have tried to remove access rights for attachment object in a business process but still the user is able to upload attachments.

Like 1

Like

3 comments

Hello Balaka,

 

could you please let us know where exactly are you trying to prevent the user from uploading/deleting attachments?

 

Thank you.

Hi,

 

You can create a sub-process on the correspondent object to restrict adding new records or deleting records based on some conditions. For example here is the code I created for the AccountFile records:

 

1) Created a sub-process:

2) Specified the following code in the "Methods" tab of the subprocess:

namespace Terrasoft.Configuration
{
 
	using DataContract = Terrasoft.Nui.ServiceModel.DataContract;
	using Newtonsoft.Json;
	using Newtonsoft.Json.Linq;
	using System;
	using System.Collections.Generic;
	using System.Collections.ObjectModel;
	using System.Data;
	using System.Drawing;
	using System.Globalization;
	using System.IO;
	using System.Linq;
	using Terrasoft.Common;
	using Terrasoft.Common.Json;
	using Terrasoft.Configuration;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.DcmProcess;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.Factories;
	using Terrasoft.Core.Process;
	using Terrasoft.Core.Process.Configuration;
	using Terrasoft.GlobalSearch.Indexing;
	using Terrasoft.UI.WebControls.Controls;
	using Terrasoft.UI.WebControls.Utilities.Json.Converters;
 
	#region Class: AccountFile_CustomEventsProcess
 
	public partial class AccountFile_CustomEventsProcess<TEntity>
	{
 
		#region Methods: Public
 
		public override void OnFileSaving()
		{
 
			DateTime currentDateTime = DateTime.Now;
			var accountId = Entity.GetTypedColumnValue<Guid>("AccountId");
			var accountResultESQ = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Account");
			accountResultESQ.UseAdminRights = true;
			accountResultESQ.AddColumn("Id");
			accountResultESQ.AddColumn("UsrRestrictUploadDateTime");
			accountResultESQ.CreateFilterWithParameters(FilterComparisonType.Equal, "Id", accountId);
			var accountResult = accountResultESQ.GetEntityCollection(UserConnection);
			var connectedAccountData = accountResult[0];
			connectedAccountData.UseAdminRights = true;
			DateTime restrictDateTime = connectedAccountData.GetTypedColumnValue<DateTime>("UsrRestrictUploadDateTime");
			int comparisonResult = DateTime.Compare(currentDateTime, restrictDateTime);
			if (comparisonResult < 0)
			{
				base.OnFileSaving();
			}
			else
			{
				throw new Exception("Restricted!");
			}
		}
 
		public virtual void OnFileDeleting()
		{
			DateTime currentDateTime = DateTime.Now;
			var accountId = Entity.GetTypedColumnValue<Guid>("AccountId");
			var accountResultESQ = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Account");
			accountResultESQ.UseAdminRights = true;
			accountResultESQ.AddColumn("Id");
			accountResultESQ.AddColumn("UsrRestrictUploadDateTime");
			accountResultESQ.CreateFilterWithParameters(FilterComparisonType.Equal, "Id", accountId);
			var accountResult = accountResultESQ.GetEntityCollection(UserConnection);
			var connectedAccountData = accountResult[0];
			connectedAccountData.UseAdminRights = true;
			DateTime restrictDateTime = connectedAccountData.GetTypedColumnValue<DateTime>("UsrRestrictUploadDateTime");
			int comparisonResult = DateTime.Compare(currentDateTime, restrictDateTime);
			if (comparisonResult < 0)
			{
				base.DeleteFileUsingFileApi();
			}
			else
			{
				throw new Exception("Restricted!");
			}
		} 
 
		#endregion
 
	}
 
	#endregion
 
}

The logic in the code will compare the date\time value specified in the UsrRestrictUploadDateTime column of the main account record where the "Account attachments" detail is located, and it the current date and time is greater than the UsrRestrictUploadDateTime column value then the save and delete will fail:

As for deleting the file: custom exception doesn't work here and the standard message is returned:

Didn't figure out why, but it won't let deleting a record anyway. Also if this logic should be applied to specific users then you will also need to create an additional logic of checking if the current user (information on the user can be received from UserConnection) can or cannot add\delete files.

 

Hope it helps.

 

Best regards,

Oscar

Oleg Drobina,

 

Hi Oscar,

 

Have you found any solution? on custom, the exception doesn't work on the deletion scenario above and the standard message is returned.

Let me know if you have any solutions.

 

Regards.

Show all comments

Hi Team

 

I'm looking for some functionality where the user gets a message sent by other user of a different role displayed as soon as he logs in to creatio system .

Also there should be complete privacy for the communication so that the two users of a common role can not see the chats of each other.

 

Please suggest some ways through which this can be achieved except for Whatsapp, Telegram and Facebook as we do not want any third party app involved in this.

 

Like 1

Like

4 comments

Hi Sarika,

 

I am sure your requirement can be fully covered using the standard Feed section where channels for posting can be created and followers can be selected:

As a result new feed messages will be displayed in the CTI panel and also in the feed section.

 

Best regards,

Oscar

Hi Oscar, 

 

Thanks for the reply.

 

This seems to be a helpful option in our case. 

 

Just request you to provide the additional information for how can we add multiple feed channels in a section or some sort of functionality where user can select the channel in which he/she wants to post?

 

Best regards,

 

Sarika

Hi,

 

I have found the option where user can select the channel but here the user - JICO is able to see the other channels list also in which he is not added(He is not added in the channels GC-CCR and GC-AXA).

 

1.How can I filter out the list of channels based on the user that is allowed to post in that channel?

 

Please Refer to the Screenshot.

 

 

 

2. How can user select the channel from the feed that is specific to each section record in the section itself? For example, how the user JICO posts in the feed after selecting the channel so that this post is specific to a section record.

 

Kindly help.

 

 

 

Best Regards,

 

Sarika

 

 

Sarika Sharma,

 

1) You need to administrate channels by records and specify correspondent record permissions to these channels

 

2) There is no way to select channels in the feed of the record page, this option is available in the Feed module in the CTI panel or in the Feed section directly.

 

Best regards,

Oscar

Show all comments

How to sort the New button with multiple cases in section page.Like section page having multiple case pages, need to sort them based on the name field.

 

 

File attachments
Like 0

Like

1 comments

Hello,

 

It's possible, the logic of the "converter" function of the "bindConfig" object of the "SeparateModeAddRecordButton" element of the BaseDataView should be modified:

 

The list of pages is returned in an "items" array of the editPages collection:

 

For example in my CaseSection section elements will be loaded in the following manner:



1) "Incident"

2) "Service request"

3) "Test cat 2"

4) "Test cat 1"



Because this is the set that is returned:

 

 

And indeed when the method ends its execution we can see that the list is loaded in the manner specified in the debugger:

You can override the method execution. In my example I've added this code to the CaseSection (in your case it should be AccountSectionV2) to the diff array of the schema and added additional logic to the method of logging the "Hello" word in the console when the method is executed:



{

                "operation": "merge",

                "name": "SeparateModeAddRecordButton",

                "propertyName": "items",

                "values": {

                    "itemType": Terrasoft.ViewItemType.BUTTON,

                    "style": Terrasoft.controls.ButtonEnums.style.GREEN,

                    "caption": {"bindTo": "AddRecordButtonCaption"},

                    "click": {"bindTo": "addRecord"},

                    "visible": {"bindTo": "IsAddRecordButtonVisible"},

                    "classes": {

                        "textClass": ["actions-button-margin-right"],

                        "wrapperClass": ["actions-button-margin-right"]

                    },

                    "controlConfig": {

                        "menu": {

                            "items": {

                                "bindTo": "EditPages",

                                "bindConfig": {

                                    "converter": function(editPages) {

                                        if (editPages.getCount() > 1) {

                                            this.console.log("Hello:)");

                                            return editPages;

                                        } else {

                                            return null;

                                        }

                                    }

                                }

                            }

                        }

                    }

                }

            }

and it worked perfectly:

 

 

So what is needed to be done is to sort the items array inside of the editPages.collection object. This is more JS-side task rather than development on the Creatio platform so you will need to perform this sorting on your side.



Best regards,

Bogdan

Show all comments

Hi All,

 

I am trying to lock all the fields on a page. So I have followed the following article:

"https://academy.creatio.com/docs/developer/interface_elements/interface_control_tools/locking_edit_page_fields/overview"

I have set the value of IsModelItemsEnabled to false in methods of the edit page in following ways,

  1. setCardLockoutStatus: function() {

                    this.set("IsModelItemsEnabled", false);

                },
  2. onEntityInitialized: function(){

                    this.callParent(arguments);

                    this.set("IsModelItemsEnabled", false);

                },

But still all the fields are editable. Can anyone suggest what am I doing wrong?

Like 0

Like

2 comments
Best reply

Hi,

 

Tested on the AccountPageV2 schema and it worked properly:

 

1) Enable the feature via the database:

DECLARE @allEmpoyeeGroupName nvarchar(max) = 'All employees';
DECLARE @featureName nvarchar(max) = 'CompleteCardLockout'
DECLARE @featureStatus bit = 1;
 
IF (NOT EXISTS (SELECT NULL FROM Feature WHERE Code = @featureName))
BEGIN
  INSERT INTO Feature (Name, Description, Code, ProcessListeners) 
  VALUES (@featureName, @featureName, @featureName, 0)
END
IF(EXISTS (SELECT NULL FROM AdminUnitFeatureState 
         WHERE FeatureId = (SELECT Id FROM Feature WHERE Code = @featureName) AND
           SysAdminUnitId = (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName)) )
BEGIN
  UPDATE AdminUnitFeatureState SET FeatureState = @featureStatus WHERE FeatureId = (SELECT Id FROM Feature WHERE Code = @featureName) AND
                              SysAdminUnitId = (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName)
END
ELSE
BEGIN
  INSERT INTO AdminUnitFeatureState (ProcessListeners, SysAdminUnitId, FeatureState, FeatureId) VALUES 
                    (
                    0,
                    (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName),
                    @featureStatus, 
                    (SELECT Id FROM Feature WHERE Code = @featureName)
                     )
END

2) In the AccountPageV2 added the following code to the diff array:

{
				"operation": "merge",
				"name": "CardContentWrapper",
				"values": {
					"generator": "DisableControlsGenerator.generatePartial"
				}
			},

3) In the AccountPageV2 added the following attribute:

"IsModelItemsEnabled": {
				dataValueType: Terrasoft.DataValueType.BOOLEAN,
				value: false
			},

4) Relogin to the app

5) Open account edit page

6) All the fields are locked

 

Best regards,

Oscar

Hi,

 

Tested on the AccountPageV2 schema and it worked properly:

 

1) Enable the feature via the database:

DECLARE @allEmpoyeeGroupName nvarchar(max) = 'All employees';
DECLARE @featureName nvarchar(max) = 'CompleteCardLockout'
DECLARE @featureStatus bit = 1;
 
IF (NOT EXISTS (SELECT NULL FROM Feature WHERE Code = @featureName))
BEGIN
  INSERT INTO Feature (Name, Description, Code, ProcessListeners) 
  VALUES (@featureName, @featureName, @featureName, 0)
END
IF(EXISTS (SELECT NULL FROM AdminUnitFeatureState 
         WHERE FeatureId = (SELECT Id FROM Feature WHERE Code = @featureName) AND
           SysAdminUnitId = (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName)) )
BEGIN
  UPDATE AdminUnitFeatureState SET FeatureState = @featureStatus WHERE FeatureId = (SELECT Id FROM Feature WHERE Code = @featureName) AND
                              SysAdminUnitId = (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName)
END
ELSE
BEGIN
  INSERT INTO AdminUnitFeatureState (ProcessListeners, SysAdminUnitId, FeatureState, FeatureId) VALUES 
                    (
                    0,
                    (SELECT Id FROM SysAdminUnit WHERE Name = @allEmpoyeeGroupName),
                    @featureStatus, 
                    (SELECT Id FROM Feature WHERE Code = @featureName)
                     )
END

2) In the AccountPageV2 added the following code to the diff array:

{
				"operation": "merge",
				"name": "CardContentWrapper",
				"values": {
					"generator": "DisableControlsGenerator.generatePartial"
				}
			},

3) In the AccountPageV2 added the following attribute:

"IsModelItemsEnabled": {
				dataValueType: Terrasoft.DataValueType.BOOLEAN,
				value: false
			},

4) Relogin to the app

5) Open account edit page

6) All the fields are locked

 

Best regards,

Oscar

Oscar Dylan,

 

I have tried this and able achieve my objective. Apparently what I was missing was, I have not added the code in diff array. Thank you so much for your time & effort.

 

Regards,

Sourav Kumar Samal

Show all comments