Skip to main content

Using 2020 R2

A while back, I created a UDF on the Journal Transactions screen

 

This value comes from a custom maintenance table.

When a JE is posted, this field is no longer editable.

I made a workaround by creating a custom form to allow the field to be modified.  The user clicks the UPDATE button to open a new screen to change the value on the JE.  However, that is clunky and not user friendly.

You can’t use workflows on Journal Transactions.  So I added the field in the Automation Steps screen:

Still no luck.  

At least the Automation Steps was able to see my UDF!  

Hi, @joe21  After configuring the Automation steps, have you also enabled the fields from the code level in Row_Selected event?

If you did not try, please do add enable code at Row_Selected event and verify.


@Naveen Boga  WORKED LIKE A CHARM!  THANK YOU!!!


Just to be clear, it worked like a charm in the Bills and Adjustments screen, but not the Journal Transactions screen.

I implemented the same process for Journal Transactions but was unable to get that field to enable.  I even tried overriding the Enabled property of the UDF in the constructor of the Journal Entry graph out of desperation.

I guess there is something in that graph that is just too powerful to overcome.  At least I was able to enable the field on Bills and Adjustments.  I now have 1 clunky removed and 1 clunky that will stay.  


Hi @joe21  Let me check for the JE screen and let you know!!


Hi, @joe21  I can able to edit the field UDF field even after Release the document. Please find the screenshot for reference.

 

 

public class BatchExt : PXCacheExtension<Batch>
{
/PXDBString(30, IsUnicode = true)]
/PXUIField(DisplayName ="Test Field")]
public string UsrDummy { get; set; }
public abstract class usrDummy : PX.Data.BQL.BqlString.Field<usrDummy> { }
}
public class JournalEntry_Extension : PXGraphExtension<JournalEntry>
{
#region Event Handlers

protected virtual void Batch_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
Batch row = e.Row as Batch;
if (row != null)
{
//Allowing caches to update with below code
Base.BatchModule.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<BatchExt.usrDummy>(cache, row, true);
}
}

#endregion
}

 

 


@Naveen Boga 

That worked.  Thank you!

PXRowSelected InvokeBaseHandler) is new to me.  I think I understand its purpose.  It is almost like overriding a constructor?  

Is there some kind of “advanced” training course available?  I know the Developer training can’t cover everything there is to know about customizing Acumatica, but I am curious how I would ever learn something like this without having to post a question on this forum.  I hate posting questions here because I feel like I am a bother.  I like to think I am able to solve issues on my own.  I spent hours trying a myriad of things and I’d never know to do what your solution provided.  

I can’t thank you and the others here enough. 


Reply