Operations (Insert, PostLoad) on AX Entity Extension class.
> Bring the List of Datasources value from Args() by using "DataEntityDataSourceRuntimeContext"
> Identify the required Datasource by using this keyword "dataEntityDataSourceStr"
> Write the code for update/insert into particular table / related tables.
For Example:
[PreHandlerFor(tableStr(HcmWorkerEntity), tableMethodStr(HcmWorkerEntity, insertEntityDataSource))]
public static void HcmWorkerEntity_Pre_insertEntityDataSource(XppPrePostArgs args)
{
DataEntityDataSourceRuntimeContext dataSourceCtx = args.getArg('_dataSourceCtx');
switch (dataSourceCtx.name())
{
case dataEntityDataSourceStr(HcmWorkerEntity, HcmWorkerTitle):
HcmWorkerTitle hcmWorkerTitle = dataSourceCtx.getBuffer();
> Bring the List of Datasources value from Args() by using "DataEntityDataSourceRuntimeContext"
> Identify the required Datasource by using this keyword "dataEntityDataSourceStr"
> Write the code for update/insert into particular table / related tables.
For Example:
[PreHandlerFor(tableStr(HcmWorkerEntity), tableMethodStr(HcmWorkerEntity, insertEntityDataSource))]
public static void HcmWorkerEntity_Pre_insertEntityDataSource(XppPrePostArgs args)
{
DataEntityDataSourceRuntimeContext dataSourceCtx = args.getArg('_dataSourceCtx');
switch (dataSourceCtx.name())
{
case dataEntityDataSourceStr(HcmWorkerEntity, HcmWorkerTitle):
HcmWorkerTitle hcmWorkerTitle = dataSourceCtx.getBuffer();
// Write your logic..
break;
}
}
No comments:
Post a Comment