We also have this issue. It doesn’t make sense to have a numbering sequence in use in Customers that is ignored when a Business Account is extended as a customer. When we extend as a customer, we would want it to change the ID to use the Customer numbering sequence.
THANK YOU for this example. Wish the in-app documentation had more examples like this.
THANK YOU SO MUCH!!!! IT WORKS! Our long national nightmare is finally over! Really appreciate the patient and detailed explanation on this. I’ve fixed several GIs already that were driving our users crazy! Jeff
So the million dollar question: Is there another field to use as a schema field? Seems really odd that this isn’t built in functionality for datetime fields to show the time in the local time. Otherwise why ask each user what timezone they’re in for their profile? Good question. The reason, let me explain - audit fields viz. CreatedDateTime and LastModifiedDateTime are stored in UTC using system attributes PXDBCreatedDateTime and PXDBLastModifiedDateTime respectively. These attributes default display format is d - short date, that is why we see only the date portion. If we modify this to say g or G - general date/time format, we then can see date and time. See example below for CreatedDateTime field that sets InputMask property to G. Standard formats can be found here: Standard date and time format strings | Microsoft Docs) public class SOOrderExt : PXCacheExtension<PX.Objects.SO.SOOrder> { #region CreatedDateTime [PXDBCreatedDate
Is there any way to do this in a GI field (convert to local user timezone from UTC) without a customization? I doubt unless there is already a field in the system which can be used as Schema Field for the column in GI. So the million dollar question: Is there another field to use as a schema field? Seems really odd that this isn’t built in functionality for datetime fields to show the time in the local time. Otherwise why ask each user what timezone they’re in for their profile?
Use attribute called PXDBDatetimeScalar for this purpose. It basically derived from PXDBScalar with SetValue() override which does the appropriate time conversion. #region UsrAppointmentDate [PXDateAndTime(DisplayMask = "g")] [PXDBDatetimeScalar(typeof(Search<CRActivity.startDate, Where<CRActivity.refNoteID, Equal<CRCase.noteID>>>), PreserveTime = true, UseTimeZone = true)] [PXUIField(DisplayName = "Appointment Date", Enabled = false)] public virtual DateTime? UsrAppointmentDate { get; set; } public abstract class usrAppointmentDate : PX.Data.BQL.BqlDateTime.Field<usrAppointmentDate> { } #endregion You sir, are fantastic. Thank you! Is there any way to do this in a GI field (convert to local user timezone from UTC) without a customization? If so, can you show an example of the formula that would do this? I know it is supposed to be automatic using the standard datetime field selection in a
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.