Hi Creatio Community!
I’m currently working on a custom Angular component (Freedom UI) and ran into an issue I hope someone has already dealt with. I created a custom table component that loads data from a web service — the structure is quite complex with nested records, so I chose to use a service instead of standard object bindings.
I'm receiving the current record ID like this:
@Input()
@CrtInput()
public recordId!: { value: string; displayValue: string };
This is how I set recordId into component
{
"operation": "insert",
"name": "CustomTable",
"values": {
"recordId": "$UsrContractConditionsGroupDS_UsrContract_c00dfo4",
"type": "usr.Table"
},
"parentName": "ListOfTarrifGroupByPeriod_ExpansionPanel",
"propertyName": "items",
"index": 0
},
When I open the page for the first time, everything works fine — the recordId
arrives as expected.
But when I back to section and open this record again, the component throws an error because recordId
is undefined
, and my table is empty.
I’m calling the service directly in ngOnInit()
.
Could you please advise on the correct way to store the record ID in the component so that it doesn’t get lost when opening the page a second time?