Skip to main content
Solved

problem assigning default values ​​to datetime and combobox


Hello, good afternoon. I have a tab "summary" that contains fields of type date and I assign the default value (today) as well as in my header but the values ​​do not appear.
  • For confidentiality reasons I cannot show all the fields on the screen

 

in the corresponding fields (DAC) of my header and summary (detail DAC) I used: 
[PXDefault(typeof(AccessInfo.businessDate))]

but only works in the header date field (not in summary tab as you can see in the image above)

 

  • the screen is a customization

can you help me please? thanks

Best answer by Naveen Boga

Hi @eddiedaco, The above mentioned syntax is correct to get the default date and it should work i.e. [PXDefault(typeof(AccessInfo.businessDate))]

 

I can only say that please move the underscore (_) from the DAC declarations and check once.

DACField:

 #region BiBidDate
        [PXDBDate()]
        [PXUIField(DisplayName = "Bid Date")]
        [PXDefault(typeof(AccessInfo.businessDate), PersistingCheck = PXPersistingCheck.Nothing)]
        public virtual DateTime? BiBidDate { get; set; }
        public abstract class biBidDate : BqlDateTime.Field<biBidDate> { }
        #endregion

 

.aspx Code:

  <px:PXDateTimeEdit ID="edBIBidDate" runat="server" DataField="BIBidDate" />

hope this helps!!

 

View original
Did this topic help you find an answer to your question?

Naveen Boga
Captain II
Forum|alt.badge.img+19

Hi @eddiedaco, The above mentioned syntax is correct to get the default date and it should work i.e. [PXDefault(typeof(AccessInfo.businessDate))]

 

I can only say that please move the underscore (_) from the DAC declarations and check once.

DACField:

 #region BiBidDate
        [PXDBDate()]
        [PXUIField(DisplayName = "Bid Date")]
        [PXDefault(typeof(AccessInfo.businessDate), PersistingCheck = PXPersistingCheck.Nothing)]
        public virtual DateTime? BiBidDate { get; set; }
        public abstract class biBidDate : BqlDateTime.Field<biBidDate> { }
        #endregion

 

.aspx Code:

  <px:PXDateTimeEdit ID="edBIBidDate" runat="server" DataField="BIBidDate" />

hope this helps!!

 


eddiedaco wrote:
Hello, good afternoon. I have a tab "summary" that contains fields of type date and I assign the default value (today) as well as in my header but the values ​​do not appear.
  • For confidentiality reasons I cannot show all the fields on the screen

 

in the corresponding fields (DAC) of my header and summary (detail DAC) I used: 
[PXDefault(typeof(AccessInfo.businessDate))]

but only works in the header date field (not in summary tab as you can see in the image above)

 

  • the screen is a customization

can you help me please? thanks

 

someone could solve this problem?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings