public void NoteFieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) { if (!String.IsNullOrEmpty(e.NewValue as string)) { //The change will only be visible after reloading the record since the note panel caches it... e.NewValue = e.NewValue + $" (added {DateTime.Now.ToString()} by {PXAccess.GetUserLogin()})\n"; } }
/// <summary> /// Check if current node in Favorites. /// </summary> private bool IsInFavorites(Guid nodeId) { using (PXDataRecord exist = PXDatabase.SelectSingle <MUIFavoriteScreen>( new PXDataField("NodeID"), new PXDataFieldValue("NodeID", nodeId), new PXDataFieldValue("IsPortal", PXSiteMap.IsPortal), new PXDataFieldValue("Username", PXAccess.GetUserLogin()))) { return(exist != null); } }