Question

How can we add the Branch ID column (editable) to the grid on Approve Clock Entries screen?


Userlevel 7
Badge +7

Hi All,

We are trying to add the Branch field on the Approve Clock Entries screen.  I was able to add the field to the screen, but now we would like it to be editable.  (Sometimes the Branch is wrong and needs to be updated before Approval.)  We would like a selector similar to the Production Nbr field. 

I added the column to the grid using the screen editor.  I also added this field to the Levels and set AllowEdit=True.  I also tried setting Enabled=True.  In all cases the field is visible but read-only.

I looked at the attributes for BranchID field on the DAC and it is simply [Branch].

I would appreciate any help from the customization gurus out there on how to make that field editable.

Thanks in advance!

Layout properties for the Branch ID control:


14 replies

Badge +10

From the screenshot, it appears that the Datafield is Branch__BranchCD. Anytime there is '__' in a Datafield name, it means the field is from a joined table rather than the primary table, which automatically makes the field read-only.

 

If BranchID exists in the primary table, you'd want to use that instead.

Userlevel 7
Badge +8

Those UI settings are irrelevant and even for a different purpose. You will need to add the field “BranchID” without any suffix or prefix. If its not editable, then you will need to set Editable to true in the DAC.Field Cacheattached event handler or using a DAC Extension. Either one will work.

Userlevel 5
Badge +1

Hi everyone,

The screen (AM516000) that you try customize has processing type, and Grid - “UnapprovedTrans” has SkinID="PrimaryInquire", it means that all columns in grid will be readOnly except Selected checkBox (as screen based on processing View object).

So, if you want to make custom field editable, you need to implement two steps in customization:

  1. Change SkinID = ”Details”
  2. Make readOnly all fields, except your custom field.

I hope it will help you.

 

P.S. don’t mix SkinID of field and SkinID of grid, you need change attribute for grid

Userlevel 7
Badge +7

Thank you all for the suggestions!

@darylbowman and @aaghaei - that makes sense regarding the underscore!  I added the base BranchID field to the grid instead, however it is still read-only.  I’m not sure of the property name to override on the DAC extension.  Editable does not seem to be a valid property.  Thoughts?

@andriikravetskyi35  - I tried changing the SkinID to Details on the grid, however the field was still read only.  Also, the Production Order number field is editable with a SkinID = PrimaryInquire.

Thanks,

Laura

Userlevel 7
Badge +8

You will need to add a graph ext for ClockApprovalProcess and set the BranchID Editable for AMClockTran using a CacheAttached event.

Userlevel 7
Badge +7

Hi @aaghaei ,

Thanks for this suggestion regarding the CacheAttached event.

Is Editable the property name to use?  I tried this and it allows me to publish but there is a runtime error:

[PXCustomizeBaseAttribute(typeof(BranchAttribute), "Editable", true)]

[PXException: Cannot find the property Editable in the attribute PX.Objects.GL.BranchAttribute.]

I don’t receive any errors with a similar syntax using the Enabled property, however it has no effect.

Thanks,

Laura

Userlevel 7
Badge +8

try

        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [PXCustomizeBaseAttribute(typeof(PXUIFieldAttribute), nameof(PXUIFieldAttribute.Enabled), true)]

Userlevel 7
Badge +8

or try

 [PXMergeAttributes(Method = MergeMethod.Merge)]

[PXUIEnabled(typeof(Where<True.IsEqual<True>>))]

Userlevel 7
Badge +7

Thanks @aaghaei ,

I tried both of your suggestions but it still isn’t editable.  It seems as if the Enabled property is already set to true.  Perhaps there is some other reason that the field is not updatable.  Thanks again for all of the advice.

 

 

Userlevel 7
Badge +8

I am not sure how you do this. I meant setting this property in the Graph Ext on the DAC field Cache Attached event

Userlevel 7
Badge +7

Hi @aaghaei ,

Thanks for the clarification.  I will give it a try.

Laura

Userlevel 7
Badge +7

Hi @aaghaei ,

I tried both suggestions in a graph extension, but no matter what I do the field is still read-only.  Any other ideas?

Thanks,

Laura

Userlevel 7
Badge

Hi @lauraj46 were you able to find a solution? Thank you!

Userlevel 7
Badge +7

Hi @Chris Hackett ,

Thanks for asking.  I was not able to get this working. 

Laura

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