Hi,
In postLoad() method you can write something like this.
public void postLoad()
{
// Overridden to have ability to create event handlers.
super();
this.EmployeeResponsibleNumber = <TableName>::find()
or
this.EmployeeResponsibleNumber = this.<methodname>(this.employeeResponsibleNumber);
}
You can use the initializeEntityDataSOurce and write something like this which should work for update operations.
public void initializeEntityDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
{
super(_entityCtx, _dataSourceCtx);
switch (_dataSourceCtx.name())
{
case dataEntityDataSourceStr(<EntityName>, <datasourcename>):
<TableBufferName> variableName = <TableName>::find(this. employeeResponsibleNumber);
If(variableName)
{
<tablename>.selectForUpdate(true);
_dataSourceCtx.setBuffer(<buffername>);
_dataSourceCtx.getBuffer().validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
_dataSourceCtx.setDatabaseOperation(DataEntityDatabaseOperation::Update);
}
break;
}
}
You have to pass the AccountNum buffer too in this case to make your code work.
Share your code snippet. Based on this, we can respond to the set of questions.