Solved
How to pass ext RefNbr in issue to Journal Ext Ref
Best answer by vardan22
You just need to override the ReleaseDocProc method specified in the INReleaseProcess graph.
public class INReleaseProcessExt : PXGraphExtension<INReleaseProcess>
{
public static bool IsActive() => true;
#region PXOverride
public delegate void ReleaseDocProcDelegate(JournalEntry je, INRegister doc, bool releaseFromHold = false);
[PXOverride]
public virtual void ReleaseDocProc(JournalEntry je, INRegister doc, bool releaseFromHold, ReleaseDocProcDelegate releaseDocProc)
{
releaseDocProc(je, doc, releaseFromHold);
Batch batch = je.BatchModule.Current;
if (batch != null && doc.DocType == INDocType.Issue)
{
batch.Description = doc.ExtRefNbr;
//for extension fields need to get an extension class and then the fields
je.BatchModule.Update(batch);
je.Save.Press();
}
}
#endregion
}
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.