Question

DataService web service: How to get custom fields labels ?

Hello,

I can `read , update ...` those fields, but I use database name of custom fields.

I want to display human labels in form.

How to get those ? 



I tried to use:

https://.bpmonline.com/0/DataService/json/SyncReply/EntitySchemaRequest

but I need to obtain packageUId + UId. 

I can get those UIds with query for VwSysEntitySchemaInWorkspace but response is very long, not effective.

Like 0

Like

8 comments

As an option, you can create a database view that will contain the needed labels. Then create an object in the configuration based on the view (please use the VwClientAddress object as an example). Then you'll be able to get the data fro the object via DataService requests. 

The following request will help you to build the view.

select top 100 * from sys.extended_properties ep
INNER JOIN sys.all_objects O ON ep.major_id = O.object_id 
  where ep.name = 'TS.EntitySchemaColumn.Caption'

 

This is not right solution for me.

I tried to send: 



curl -X POST https://030115-crm-bundle.bpmonline.com/0/DataService/json/SyncReply/En… -H 'Content-type: application/json' -H 'Accept: application/json' -d  '{"uId":"b4e643d3-42c6-41a3-a0af-7f90ec87f105","packageUId":"d5973813-1680-4a63-bfcf-c1dc9ce2ee50"}' -b cookies.txt -H 'BPMCSRF: nddIMNFxECNuhwL3FmlgyO'



and it works fine



but I don't now if those uIds are common for all bpm platforms (in other CRM bpm accounts it works well)

They are the same in different products in a single version. However, we don't guarantee that they won't be changed in the further versions. 

I can get packageUId with:



 

curl -X POST https://030115-crm-bundle.bpmonline.com/0/DataService/json/SyncReply/Sc… -H 'User-agent: PieSync/Steroids/0.27.3 (connectors@piesync.com)' -H 'Content-type: application/json' -H 'Accept: application/json' -d '{"contractName":"SchemaDesignerRequest","requestTimeout":60000000,"responseClassName":"Terrasoft.BaseResponse","getCurrentPackageUId":true}' -b cookies.txt -H 'BPMCSRF: JZfuTgtIRKOyIfvQioAdyu'

 

{"success":true,"maxEntitySchemaNameLength":0,"currentPackageUId":"d5973813-1680-4a63-bfcf-c1dc9ce2ee50"}



but how to get UId?



PS: this is overkill without filters: (+ below there are filters with some IDs from web interface):



curl -X POST https://030115-crm-bundle.bpmonline.com/0/DataService/json/SyncReply/Se… -H 'User-agent: PieSync/Steroids/0.27.3 (connectors@piesync.com)' -H 'Content-type: application/json' -H 'Accept: application/json' -d '{"rootSchemaName":"VwSysEntitySchemaInWorkspace","operationType":0,"filters":{"items":{"c3a4dabb-d4e0-48f4-a4c2-25bbc1753b1d":{"filterType":1,"comparisonType":3,"isEnabled":true,"trimDateTimeParameterToDate":false,"leftExpression":{"expressionType":0,"columnPath":"SysWorkspace"},"rightExpression":{"expressionType":2,"parameter":{"dataValueType":1,"value":"07ba2497-d09b-40ef-92d3-d56f01d426fa"}}},"31bb3f75-7433-4ade-9e4a-5c8dec4ba957":{"filterType":1,"comparisonType":3,"isEnabled":true,"trimDateTimeParameterToDate":false,"leftExpression":{"expressionType":0,"columnPath":"ManagerName"},"rightExpression":{"expressionType":2,"parameter":{"dataValueType":1,"value":"EntitySchemaManager"}}}},"logicalOperation":0,"isEnabled":true,"filterType":6},"columns":{"items":{"Id":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"Id"}},"Name":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"Name"}},"Caption":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"Caption"}},"UId":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"UId"}},"PackageUId":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"PackageUId"}},"Parent.UId":{"caption":"","orderDirection":0,"orderPosition":-1,"isVisible":true,"expression":{"expressionType":0,"columnPath":"Parent.UId"}}}},"isDistinct":false,"rowCount":-1,"rowsOffset":-1,"isPageable":false,"allColumns":false,"useLocalization":true,"useRecordDeactivation":false,"serverESQCacheParameters":{"cacheLevel":0,"cacheGroup":"","cacheItemName":""},"queryOptimize":false,"isHierarchical":false}' -b cookies.txt -H 'BPMCSRF: nddIMNFxECNuhwL3FmlgyO'

You can find the UId of of a schema in the SysSchema table.

select UId from SysSchema

Eugene Podkovka,

I don't find in SysSchema desired UId

Finally:

I get UId with post :

https://030115-crm-bundle.bpmonline.com/0/DataService/json/SyncReply/Se…

body:

{ rootSchemaName: 'VwSysEntitySchemaInWorkspace', operationType: 0,
        filters: {
          items:  { "filter_for_schema_manager":
                    { filterType: 1, comparisonType: 3,
                      isEnabled: true, trimDateTimeParameterToDate: false, leftExpression:
                        { expressionType: 0, columnPath: 'ManagerName' },
                      rightExpression: { expressionType: 2, parameter:
                        { dataValueType: 1, value: 'EntitySchemaManager' } } },
                    primaryColumnFilter:
                      { filterType: 1, comparisonType: 3, isEnabled: true,
                        trimDateTimeParameterToDate: false, leftExpression:
                          { expressionType: 0, columnPath: 'Name' },
                        rightExpression:
                          { expressionType: 2, parameter:
                            { dataValueType: 1, value: 'Contact' } } } },
          logicalOperation: 0, isEnabled: true, filterType: 6
      },
      columns: {
        items: {  Id:
                    { caption: '', orderDirection: 0, orderPosition: -1, isVisible: true,
                      expression: { expressionType: 0, columnPath: 'Id' } },
                  Name:
                    { caption: '', orderDirection: 0, orderPosition: -1, isVisible: true,
                      expression: { expressionType: 0, columnPath: 'Name' } },
                  UId:
                    { caption: '', orderDirection: 0, orderPosition: -1, isVisible: true,
                      expression: { expressionType: 0, columnPath: 'UId' } },
                  PackageUId:
                    { caption: '', orderDirection: 0, orderPosition: -1, isVisible: true,
                      expression: { expressionType: 0, columnPath: 'PackageUId' } },
                  ExtendParent:
                    { caption: '', orderDirection: 0, orderPosition: -1, isVisible: true,
                      expression: { expressionType: 0, columnPath: 'ExtendParent' } } }
      },
      isDistinct: false, rowCount: -1, rowsOffset: -1, isPageable: false, allColumns: false,
      useLocalization: true, useRecordDeactivation: false,
      serverESQCacheParameters: { cacheLevel: 0, cacheGroup: '', cacheItemName: '' },
      queryOptimize: false, isHierarchical: false }

 

Show all comments