Below code shows how to get buffer from form data source field event handler(modified field) and update values as per the requirement
/// <summary>/// Logic that displays the end time of the day/// </summary>/// <param name="sender"></param>/// <param name="e"></param>[FormDataFieldEventHandler(formDataFieldStr(BankStatementTable, BankStmtISOAccountStatement, ToDateTime), FormDataFieldEventType::Modified)]public static void ToDateTime_OnModified(FormDataObject sender, FormDataFieldEventArgs e){ FormDataSource BankStmtISOAccountStatement_ds = sender.datasource(); BankStmtISOAccountStatement bankStmtISOAccountStatement = BankStmtISOAccountStatement_ds.cursor(); TimeOfDay secondsElapsed; secondsElapsed = 86399; if(!bankStmtISOAccountStatement.ToDateTime) { bankStmtISOAccountStatement.ToDateTime = DateTimeUtil::newDateTime(DateTimeUtil::getSystemDate (DateTimeUtil:: getUserPreferredTimeZone()), secondsElapsed); } else { bankStmtISOAccountStatement.ToDateTime = DateTimeUtil::newDateTime(DateTimeUtil::date (bankStmtISOAccountStatement.ToDateTime), secondsElapsed); }}
No comments:
Post a Comment