Skip to main content
Solved

How to add a time field?


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.

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


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?


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


@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.

 


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

 


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

Can you please share the customization package here?


Hey @Naveen Boga , attached here is the pkg.


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

 


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

 


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.
 

 


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

 

 


@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!


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


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


Great! Thanks for sharing the update.


Reply