Skip to main content
Solved

Allow edit to shipment line field after confirmation


Forum|alt.badge.img

I’m having trouble figuring out the code to allow me to modify the workflow of preventing a field from becoming disabled at shipment confirmation.

 

The field I want to allow edit’s is ISPSUCC128

 

Here is the code I’m attempting to use but I’m getting a validation error

 

  public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOShipment row = e.Row as SOShipment;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;
                PXUIFieldAttribute.SetEnabled<SOPackageDetailEx.ISPSUCC128>(cache, row, true);
                
            }
        }
    }

 

Thanks,
Justin

Best answer by Naveen Boga

Hi Justine, I’m not able to deploy either of the packages.

I created a new sample package and enabled the TRACKING NBR field when the shipment is in COMPLETED status.

You can change the field name and check once. I have attached the package.

 

Screenshot for reference.

 

 

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

9 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3406 replies
  • June 20, 2023

Hi @jcox43  To enable the fields in Acumatica once the document has been changed to CONFIRMED /COMPLETED statuses, we must enable those custom fields both at the Code level and also from the Workflow steps.

 

Here is the article - https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html

 

Please let me know if you need any help on this.

 

Hope this helps


Forum|alt.badge.img
  • Author
  • Freshman I
  • 26 replies
  • June 20, 2023

Naveen,

Sorry I didn’t explain that I do have the workflow steps also included in this. Which I think is correct but I believe the code is where I’m running into issues. 

 

I’ve attached my customization package

 

Thanks,
Justin


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3406 replies
  • June 20, 2023

Hi @jcox43  I have reviewed the above shared package but in the package below highlighted field is not available. Can you please share the right package?

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • 26 replies
  • June 20, 2023

The field I’m attempting to “unlock” is not contained in the same package.

There is a large customization package that includes the ISPSUCC128 custom field.

 

I’ve attached both packages, the “EDI” package contains all of the custom fields and much more. The “JCUCC128” is the package I’m attempting to use to “unlock” that specific field when the shipment is in the confirmed status.

 

Thanks,
Justin


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3406 replies
  • Answer
  • June 20, 2023

Hi Justine, I’m not able to deploy either of the packages.

I created a new sample package and enabled the TRACKING NBR field when the shipment is in COMPLETED status.

You can change the field name and check once. I have attached the package.

 

Screenshot for reference.

 

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • 26 replies
  • June 20, 2023

Naveen,

This looks to be getting real close, I had to merge the code with another package that contained “SOShipmentEntry”. But there is something in the code that unlocks the entire row instead of specific fields and also for every status instead of just confirmed.

 

I disabled all other customization packages and used the one you provided and it seems to do the same thing.

 

Thanks,
Justin


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3406 replies
  • June 21, 2023

@jcox43  If you have included the necessary fields in the package, I am able to assist you in making modifications and returning the package to you.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 26 replies
  • June 26, 2023

Naveen, 

 

Thanks for you help on this, I think I’m okay with how this is working right now. (The requirement for this is only temporary).

 

Again thanks for helping me out!


Forum|alt.badge.img
  • Author
  • Freshman I
  • 26 replies
  • April 10, 2024

Naveen,

 

We just recently upgraded to 2023 R2 so I had to update this package to get it to validate. I didn’t like the line -   PXUIFieldAttribute.SetEnabled<SOPackageDetailEx.ISPSUCC128>(cache, row, true);

 

It was telling me that field didn’t exist.. but it said the same thing when I changed the field to “TrackNumber”. But anyways I removed that line and was able to get it published. However now when making a change it tells me the save button is disabled, but I can click the save button a second time and it works correctly.

 

Am I missing something here?

 

Thanks


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