Skip to main content
Solved

How to add a time field?


Forum|alt.badge.img+3

Hello all,

I have been trying to add a time field in acumatica. I know how to add a single field on detail level:
 

We have the option to add a date field but how shall I add only a time field?
Thanks in advance.

Best answer by Naveen Boga

@Harshita  can you please publish the below package and add the field in the .aspx page?

 

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

16 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 4, 2024

Hi @Harshita  We should the DATETIME field only.  Below is the link for your reference and it will help.

 

https://riptutorial.com/acumatica/example/32320/the-pxdbtime-attribute


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024
Naveen Boga wrote:

Hi @Harshita  We should the DATETIME field only.  Below is the link for your reference and it will help.

 

https://riptutorial.com/acumatica/example/32320/the-pxdbtime-attribute

where & how shall I these 2 in the customization project editor?


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 4, 2024

@Harshita Add DateTime field from the Project Editor and modify the DAC fields as shown in the above mentioned in the link.


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024
Naveen Boga wrote:

@Harshita Add DateTime field from the Project Editor and modify the DAC fields as shown in the above mentioned in the link.

hey @Naveen Boga ,
I followed like this.

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 4, 2024

Hey  @Harshita  Seems usrTime field is duplicated in the POLineExt DAC. Can you please remove the duplicate and check once.

 


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024
Naveen Boga wrote:

Hey  @Harshita  Seems usrTime field is duplicated in the POLineExt DAC. Can you please remove the duplicate and check once.

 

Hey @Naveen Boga , so I created a new field now as FieldName: UsrATime & Display Name : ATime DataType: datetime.

And copied the code from the above link & replaced usrTime & UsrTime to usrATime & UsrATime. Am I doing it correct?
 

#region UsrATime
public abstract class usrATime : IBqlField
{ }

[PXDBTime(DisplayMask = "t", InputMask = "t")]
[PXUIField(DisplayName = "Time Only Value")]
public DateTime? UsrATime { get; set; }
#endregion

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 4, 2024

Can you please share the customization package here?


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024

Hey @Naveen Boga , attached here is the pkg.


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024

hey @Naveen Boga , I tried to modify as below:
 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • Answer
  • July 4, 2024

@Harshita  can you please publish the below package and add the field in the .aspx page?

 


Forum|alt.badge.img+3
  • Author
  • Captain II
  • 317 replies
  • July 4, 2024

Hey @Naveen Boga , thanks for helping out. I now tried to publish the customization. The field is working fine. I also added a checkbox field : eg Expedited. DataType - Bool. But it didnt result out to be checkbox on UI.
 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 4, 2024

@Harshita  Please provide the Type = Checkbox in the .aspx page.

 

 


temberson
Freshman II
  • Freshman II
  • 21 replies
  • July 16, 2024
Naveen Boga wrote:

@Harshita  can you please publish the below package and add the field in the .aspx page?

 

Hi @Naveen Boga, What did you do to resolve this? I am also running into the same error CS0102 when replicating the example. 

Thanks!


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • July 19, 2024

@temberson  What is the issue that you are facing, can you please elaborate.


temberson
Freshman II
  • Freshman II
  • 21 replies
  • August 20, 2024

@Naveen Boga Thank you for the response, this was resolved. 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3401 replies
  • August 20, 2024

Great! Thanks for sharing the update.


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