Reputation: 21
I have a custom field in sales order header. I want to paste the value from this field to sales invoice when i click the prepare invoice action in Acumatica. here is the image of the screen:
Upvotes: 2
Views: 574
Reputation: 5151
You'll need to override the Action PrepareInvoice and pass the custom fields.
There are two ways of achieving this:
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
[PXOverride]
public IEnumerable PrepareInvoice(PXAdapter adapter, Func<PXAdapter, IEnumerable> baseMethod)
{
//You can paste your field either here
return baseMethod(adapter); // and then return
}
or like this:
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
[PXOverride]
public IEnumerable PrepareInvoice(PXAdapter adapter, Func<PXAdapter, IEnumerable> baseMethod)
{
var result = baseMethod(adapter);
// add your pasting of your field here + some logic
return result;
}
depending from what is your use case.
Upvotes: 2