Hi All,
I use FormDataSourceEventType::Initialized on HcmPosition .In this am not get any value below code .
Please give any idea to get value using below code.
[FormDataSourceEventHandler(formDataSourceStr(HcmPosition, HcmPositionDuration), FormDataSourceEventType::Initialized)]
public static void HcmPositionDuration_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
{
FormControl Position;
HcmPositionWorkerAssignment hcmPositionWorkerAssignment;
HcmPositionWorkerAssignmentEndDate enddate;
FormRun element = sender.formRun();
FormDataSource hcmPositionDuration_ds = element.dataSource(formDataSourceStr(HcmPosition, HcmPositionDuration)) as FormDataSource;
HcmPositionDuration hcmPositionDuration = hcmPositionDuration_ds.cursor();
Info(strFmt("%1",HcmPositionDuration.Position));
}
If you want to work with current record you need to work with "active" method. It gets triggered when record is selected. Also you can use CoC instead of events, here is docs article about CoC docs.microsoft.com/.../method-wrapping-coc it shows how to use with init() but you should get a point
Hi Tony,
Initialized event is used during the initial initialization of data source and for example, you can apply additional ranges here.
In your case, you need to use OnInitValue event.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156