Unable to add new rows in detail inside a detail from portal user.

Hello,

 

I am trying to add a new record in a detail inside to another one. The + button is missing even the object permission are configured for this role. (attach Creatio1.png)

 

When I change the detail with option "Make the list editable"  (attach Creatio2.png), the button is shown but the business rules and filters are not applied.  (attach Creatio3.png)

 

Any idea how to fix this issue?

Like 0

Like

4 comments
Best reply

Hello Denisa,

 

I would be happy to provide you with additional information regarding the database connections for the detail in question.

The detail must be connected to the SysModuleEntity record, which was added to the portal (SysModuleEntityInPortal table) to display for portal users.

Also, the detail must be connected to the SysModuleEntity record with no connection to the portal setting (SysModuleEntityInPortal table) to display for system users.



You have to create separate records  for details in the SysModuleEntity table:



1. The required connections for system users:

SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

2. The required connections for portal users :

SysModuleEntityInPortal (SysModuleEntityId column) - SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

 

By confirming the presence of these connections, you can ensure that the detail is properly configured to be displayed for both system users and portal users.

 

Best regards,

Kate

Hello!

 

It seems that you use the same detail for the main and portal page. To resolve the current issue, we recommend creating a separate detail for the portal page.

Here are the steps you can follow:

1) Go to the portal master wizard for your section.

2) Remove the existing detail from the portal edit page.

3) Create and add a new detail specifically designed for portal users in the detail section wizard, based on the existing object.

4) Add the new detail to the portal page.

5) Make sure to save the changes.

 

By creating a separate detail for the portal page, you can ensure that the issue you are experiencing is addressed and the users have the appropriate functionality.

 

Best regards,

Kate

Kate Karpik,

Hello Kate,

 

Thank you for your response. Your steps seems to be ok if the detail is related with section, because you have the possibility to have two section pages for full and portal and then relate full/portal detail schema in each page.

 

The issue I'm facing is with detail inside the detail. The system create only one page for the parent detail and if you have another detail inside the first one, even if you create two different details, the page of the parent detail is only one so the cardschema is the same for both full/portal of the child detail and the parent detail page is related only with one of them

Hello Denisa,

 

I would be happy to provide you with additional information regarding the database connections for the detail in question.

The detail must be connected to the SysModuleEntity record, which was added to the portal (SysModuleEntityInPortal table) to display for portal users.

Also, the detail must be connected to the SysModuleEntity record with no connection to the portal setting (SysModuleEntityInPortal table) to display for system users.



You have to create separate records  for details in the SysModuleEntity table:



1. The required connections for system users:

SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

2. The required connections for portal users :

SysModuleEntityInPortal (SysModuleEntityId column) - SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

 

By confirming the presence of these connections, you can ensure that the detail is properly configured to be displayed for both system users and portal users.

 

Best regards,

Kate

Kate Karpik,

 

Thanks for the detailed explanation, it worked out:)

 

The code in case that someone has the same issue:

-- 1. (Manual input) Change caption: with the caption of the new entity related with new detail
-- In my case the new object, the page and both details (full/portal) begin with ne same contain same caption. 
DECLARE @Caption as varchar(200) = 'Loan proposed terms and condition'
 
--2. (Manual input) Change Name: with the Name of the Parent Page of new detail 
DECLARE @CardSchemaUId uniqueidentifier = (
	SELECT	UId 
	FROM	SysSchema 
	WHERE	Name='FZSchema584f510ePage' 
)
-- 3. (Automatic) Get Uid of entityschema related to new detail
DECLARE @SysEntitySchemaUId uniqueidentifier = ( 
	SELECT	TOP 1 UId 
	FROM	dbo.SysSchema 
	WHERE	Caption like '%' + @Caption +'%' and ManagerName = 'EntitySchemaManager' 
)
 
-- 4. (Automatic) Insert if not exist on SysModuleEntityInPortal
INSERT INTO [dbo].[SysModuleEntityInPortal] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [SysPortalId], [SysModuleEntityId])
SELECT	[Id] = NEWID(), [CreatedOn] = getDate(), [CreatedById]=CreatedById, [ModifiedOn] = getDate(), [ModifiedById]= CreatedById, [ProcessListeners]=0, 
		[SysPortalId] = 'C8565240-1DA3-4A68-BD4E-280F17B0D32E', [SysModuleEntityId] = SysModuleEntity.Id
FROM	(
			SELECT	id, [CreatedById], SysEntitySchemaUId
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		) SysModuleEntity		
		OUTER APPLY (
			SELECT	count (1) AS NR
			FROM	dbo.SysModuleEntityInPortal scp
					INNER JOIN dbo.SysModuleEntity sm ON scp.SysModuleEntityId = sm.Id
			WHERE	sm.SysEntitySchemaUId = @SysEntitySchemaUId
		) InSysPortal
WHERE	InSysPortal.NR IS NULL OR InSysPortal.NR = 0
 
-- 5. (Automatic) Insert if not exist on SysDetail
INSERT INTO [dbo].[SysDetail] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [Caption], [DetailSchemaUId], [EntitySchemaUId])
SELECT	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [ProcessListeners], 
		[Caption] = SysSchema.Caption, [DetailSchemaUId] = SysSchema.Uid, [EntitySchemaUId] = @SysEntitySchemaUId
FROM	dbo.SysSchema 
WHERE	Caption like '%' + @Caption +'%' AND [Name] like '%Detail' AND ManagerName ='ClientUnitSchemaManager'
		AND Uid not in (Select [DetailSchemaUId] from SysDetail)
 
-- 6. (Automatic) Insert if not exist on SspPageDetail
INSERT INTO [dbo].[SspPageDetail] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [CardSchemaUId], [EntitySchemaUId], [SysDetailId])
Select	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [ProcessListeners], 
		[CardSchemaUId] = @CardSchemaUId, [EntitySchemaUId] = SysDetail.EntitySchemaUId, [SysDetailId] = SysDetail.Id
FROM	SysDetail 
WHERE	EntitySchemaUId=@SysEntitySchemaUId and Caption like '%portal%'
		and Id not in ( Select SysDetailId FROM SspPageDetail )
 
-- 7. (Automatic) Insert if not exist on SysModuleEntity
INSERT INTO [dbo].[SysModuleEntity] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [TypeColumnUId], [ProcessListeners], [SysEntitySchemaUId])
SELECT	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [TypeColumnUId], [ProcessListeners], [SysEntitySchemaUId]
FROM	dbo.SysModuleEntity
WHERE	SysEntitySchemaUId = @SysEntitySchemaUId AND 
		(
			SELECT	count (1) 
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		) < 2
 
-- 8. (Automatic) Insert if not exist on SysModuleEdit also the new recored that was insertet on previos step
INSERT INTO [dbo].[SysModuleEdit] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [SysModuleEntityId], [TypeColumnValue], [UseModuleDetails], [Position], [HelpContextId], [ProcessListeners], [SysPageSchemaUId], [CardSchemaUId], [ActionKindCaption], [ActionKindName], [PageCaption], [MiniPageSchemaUId], [SearchRowSchemaUId], [MiniPageModes])
SELECT	TOP 1 [Id] = NEWID(), [CreatedOn] = getDate(), [CreatedById], [ModifiedOn] = getDate(), [ModifiedById], 
		[SysModuleEntityId] = new.SysModuleEntityId, [TypeColumnValue], [UseModuleDetails], [Position], [HelpContextId], [ProcessListeners]=0, [SysPageSchemaUId], [CardSchemaUId], [ActionKindCaption], [ActionKindName], [PageCaption], [MiniPageSchemaUId], [SearchRowSchemaUId], [MiniPageModes]
FROM	SysModuleEdit ref
		CROSS JOIN (
			SELECT	s.id as SysModuleEntityId
			FROM	SysModuleEntity s
					LEFT JOIN SysModuleEdit t On t.SysModuleEntityId = s.Id 
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId AND t.id IS NULL
		) new 
WHERE	ref.SysModuleEntityId in (
			SELECT	id
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		)

 

Show all comments