Solved

Field Length change not reflected on Employee Time Activities screen

  • 21 January 2023
  • 2 replies
  • 63 views

I’m working on a simple customization to extend the field length of the Summary (Description) field in the grid of the the Employee Time Activities screen. I’ve updated the field length with a database script included in the package (I’ve confirmed that the length is changed in the database) and I’ve updated the DAC (PMTimeActivity) to reflect the new 4000 character limit.

[PXDBString(4000, InputMask = "", IsUnicode = true)]
[PXDefault]
[PXUIField(DisplayName = "Summary", Visibility = PXUIVisibility.SelectorVisible)]
[PXFieldDescription]
[PXNavigateSelector(typeof(PX.Objects.CR.CRPMTimeActivity.summary))]

The field on the Employee Time Activities screen still only accepts the default 256 character limit. It seems like this change isn’t being inherited in the EPActivityApprove DAC that the Employee Time Activities screen uses. Either I’m running into a bug or I’m missing something simple here.

icon

Best answer by Yuriy Zaletskyy 21 January 2023, 10:26

View original

2 replies

Userlevel 5
Badge +3

It seems like you have correctly updated the DAC (PMTimeActivity) to reflect the new 4000 character limit for the Summary (Description) field, but the change is not being reflected on the Employee Time Activities screen. This might be because the screen is using a different DAC - the EPActivityApprove DAC - to populate the grid. The EPActivityApprove DAC is a view DAC that is used to display the data from the PMTimeActivity DAC with additional fields and filters.

You should check if the EPActivityApprove DAC has the Summary (Description) field defined and if it has the same attributes as the PMTimeActivity DAC. If the EPActivityApprove DAC has the Summary (Description) field defined, you may need to update the attributes of the field in the EPActivityApprove DAC to match the PMTimeActivity DAC. Also make sure that the EPActivityApprove DAC is correctly inheriting from the PMTimeActivity DAC.

Another thing you could check is if the screen is using a custom attribute to set the length of the Summary field. It could be something like [PXDBString(256, InputMask = "", IsUnicode = true)], in that case you will need to change it to [PXDBString(4000, InputMask = "", IsUnicode = true)]

It's also possible that you have an event handler that is overriding the value of the field length. You could check to see if there are any event handlers in your customization that are modifying the field length and if so, update them to reflect the new length.

In summary, you should check the attributes of the Summary (Description) field in the EPActivityApprove DAC and make sure that it's inheriting the field from PMTimeActivity DAC correctly. Also, you may need to check if there are any custom attributes or event handlers that are modifying the field length.

In summary, you should check the attributes of the Summary (Description) field in the EPActivityApprove DAC and make sure that it's inheriting the field from PMTimeActivity DAC correctly. Also, you may need to check if there are any custom attributes or event handlers that are modifying the field length.

@Yuriy Zaletskyy There were no other modifications impacting the field length, but the override on the EPActivityApprove DAC did seem to be the culprit here, overriding the field at the screen level worked fine for this scenario.

public class EmployeeActivitiesEntry_Extension : PXGraphExtension<PX.Objects.EP.EmployeeActivitiesEntry>
{
#region Event Handlers


[PXDBString(4000, InputMask = "", IsUnicode = true)]
[PXDefault]
[PXUIField(DisplayName = "Summary", Visibility = PXUIVisibility.SelectorVisible)]
[PXFieldDescription]
[PXNavigateSelector(typeof(summary))]
protected virtual void EPActivityApprove_Summary_CacheAttached(PXCache cache)
{

}



#endregion
}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved