Article

Open access to custom objects in portal

1) In object you need set ON access by operations and publish object

2) On “Objects permissions” tab in configuration add roles “All portal users” and “All employees” for this object and manage access level for them

3) In Lookups section find lookup “List of objects available for portal users” and add your objects

4) If your object has edit page and you want see lookup value related to this object like a link you need paste this code to your page (change “UsrEntity1” to your object name and “UsrEntity1Page” to object’s edit page):

Enable lookup field link

methods: {
    init: function() {
        this.callParent(arguments);
        Terrasoft.configuration.ModuleStructure.UsrEntity1 = {
            cardSchema: "UsrEntity1Page"
            entitySchemaName: "UsrEntity1",
            pages: [{
                UId: "",
                cardSchema: "UsrEntity1Page"
            }]
        };
        Terrasoft.configuration.EntityStructure.UsrEntity1 = {
            entitySchemaName: "UsrEntity1",
            pages: [{
                UId: "",
                typeColumnName: "",
                cardSchema: "UsrEntity1Page"
            }]
        };
    }
}

5) In order to view EntityStructure and ModuleStructure of your object, execute SQL script below:

DECLARE @TableName NVARCHAR(100) = 'Activity' -- Change to your object name
SELECT
  ss.Name 'entitySchemaName',
  sh.Name 'cardSchema',
  sr.ColumnName 'typeColumnName',
  ed.TypeColumnValue 'UId'
FROM SysModuleEdit ed
  INNER JOIN SysModuleEntity en ON ed.SysModuleEntityId = en.Id
  INNER JOIN SysSchema ss ON en.SysEntitySchemaUId = ss.UId
  INNER JOIN SysSchema sh ON ed.CardSchemaUId = sh.UId
  LEFT OUTER JOIN SysEntitySchemaReference sr ON sr.ColumnUId = en.TypeColumnUId AND sr.SysSchemaId = ss.Id
WHERE ss.ExtendParent = 0 AND ss.Name = @TableName
ORDER BY ed.Position

 

Like 0

Like

Share

0 comments
Show all comments