Question

Dynamic grid data from web service

Hello,

I have a detail area on a tab of a section. Is there a way to populate it with data from a server side configuration web service?

Like 0

Like

3 comments

Dear Allen, 

 

Please check the community article below that describes how to do that: 

https://community.creatio.com/articles/add-virtual-detail-page

 

Best regards, 

Dennis 

Hi Dennis Hudson,

 

Thank you Dennis, this was very helpful. I was able to build the virtual detail on a tab in the Accounts section. However there are errors in the application console when the tab is initially opened and no data has been loaded yet. I believe it has to do with the fact that the column structure cannot be determined from the virtual object. Is there a way to have the base functionality not generate these errors?

 

baseobject.js:124 Error while sending request 
    response status: 500 (SelectFromVirtualSchemaException)
    request url: ../DataService/json/SyncReply/SelectQuery
    method: POST
    request data: {"rootSchemaName":"UsrCustomVirtualObject","operationType":0,"filters":{"items":{"56b05a26-ab24-49a3-9942-ea37afaf8c5e":{"items":{"masterRecordF...

--------------------------------------------------------------------------------------------------------

basequery.js:157 Uncaught constructor {errorCode: "SelectFromVirtualSchemaException", message: "Sample cannot be built for virtual workspace item UsrCustomVirtualObject.", stackTrace: undefined, errors: Array(0)}

I was able to resolve the error above by overriding the  loadGridData method in the detail schema and having it make the call to the method that populates data. Since loadGridData is not populating data from the Creatio database, it should be an override to make sure the base method code is not used. The solution in the community article proposes that the detail grid be loaded via the init function, but i found this approach has issues and generates errors when navigating between records in a section. Having the code to load data via the loadGridData method worked better. Hope this is helpful.

Show all comments