Skip to main content
Question

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


lauraj46
Captain II
Forum|alt.badge.img+8

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

darylbowman
Captain II
Forum|alt.badge.img+13

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.


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • May 25, 2023

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.


andriikravetskyi35
Jr Varsity I
Forum|alt.badge.img+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


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • May 25, 2023

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


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • May 25, 2023

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


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • May 25, 2023

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


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • May 25, 2023

try

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


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • May 25, 2023

or try

 [PXMergeAttributes(Method = MergeMethod.Merge)]

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


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • May 25, 2023

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.

 

 


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • May 25, 2023

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


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • May 30, 2023

Hi @aaghaei ,

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

Laura


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • May 31, 2023

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


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2640 replies
  • June 21, 2023

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


lauraj46
Captain II
Forum|alt.badge.img+8
  • Author
  • Captain II
  • 511 replies
  • June 21, 2023

Hi @Chris Hackett ,

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

Laura


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