How to properly add records to DAC through PXActions in an ExtensionHow do I properly clean up Excel interop objects?Can I add extension methods to an existing static class?How to loop through all enum values in C#?Updating DAC ExtensionHow to reference new field if it is DAC ExtensionHow to automatically refresh the SO Order Entry PageHow to Access DAC Extension on Action DelegateDAC extension field always nullAcumatica - Extended graph children not showing when viewTrying to implement inherited Attributes for custom records

What is the purpose/function of this power inductor in parallel?

When and which board game was the first to be ever invented?

What's the point of writing that I know will never be used or read?

Trying to understand how Digital Certificates and CA are indeed secure

Adding things to bunches of things vs multiplication

Did Michelle Obama have a staff of 23; and Melania have a staff of 4?

global variant of csname…endcsname

Unconventional examples of mathematical modelling

Pocket Clarketech

Gofer work in exchange for LoR

Why is the battery jumpered to a resistor in this schematic?

Have made several mistakes during the course of my PhD. Can't help but feel resentment. Can I get some advice about how to move forward?

How do the Durable and Dwarven Fortitude feats interact?

Are unaudited server logs admissible in a court of law?

Can I use images from my published papers in my thesis without copyright infringment?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

My new Acer Aspire 7 doesn't have a Legacy Boot option, what can I do to get it?

Get file name and directory in .vimrc file

Will some rockets really collapse under their own weight?

Ending a line of dialogue with "?!": Allowed or obnoxious?

How could Tony Stark wield the Infinity Nano Gauntlet - at all?

Quick destruction of a helium filled airship?

Are there any OR challenges that are similar to kaggle's competitions?

If I am sleeping clutching on to something, how easy is it to steal that item?



How to properly add records to DAC through PXActions in an Extension


How do I properly clean up Excel interop objects?Can I add extension methods to an existing static class?How to loop through all enum values in C#?Updating DAC ExtensionHow to reference new field if it is DAC ExtensionHow to automatically refresh the SO Order Entry PageHow to Access DAC Extension on Action DelegateDAC extension field always nullAcumatica - Extended graph children not showing when viewTrying to implement inherited Attributes for custom records






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















SUMMARY



I have created a graph extension for the APInvoiceEntry graph (AP301000 screen), called APInvoiceEntry_Extension.



I created a new DB Table called APRegisterException, which stores exception information for SalesTax, Freight, Price, and Qty errors.There is a 1 to many relationship between APRegister and APRegisterException, indicating that a bill can have many different types of exceptions. For each of these exceptions, I created a button and an action to add Exceptions to the DAC within my extension graph.



THE PROBLEM



I am only able to add 1 new APRegisterExcetion record to the DAC. The DAC is not updating for multiple button clicks. Each of the following actions should create a new APRegisterException record, and add them to the Exceptions DAC within my graph.



public PXAction<APInvoice> ApplyPriceException;
public PXAction<APInvoice> ApplyQtyException;
public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;



note: the actions are executing, it's just the DAC that is not
updating.




CODE



APREgisterException DAC



namespace BillsAndAdjustmentsExt

[Serializable]
public class APRegisterException : IBqlTable

#region APRegisterRefNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Ref Nbr")]
public virtual string APRegisterRefNbr get; set;
public abstract class aPRegisterRefNbr : IBqlField
#endregion

#region APTranLineNbr
[PXDBInt()]
[PXUIField(DisplayName = "Line Nbr")]
public virtual int? APTranLineNbr get; set;
public abstract class aPTranLineNbr : IBqlField
#endregion

#region ExceptionDesc
[PXDBString(150, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string ExceptionDesc get; set;
public abstract class exceptionDesc : IBqlField
#endregion

#region ExceptionType
[PXDBString(3, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Exc. Type")]
public virtual string ExceptionType get; set;
public abstract class exceptionType : IBqlField
#endregion

#region ApprovedByID
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Approved By")]
public virtual string ApprovedByID get; set;
public abstract class approvedByID : IBqlField
#endregion

#region ApprovedDate
[PXDBDate()]
[PXUIField(DisplayName = "Approval Date")]
public virtual DateTime? ApprovedDate get; set;
public abstract class approvedDate : IBqlField
#endregion




EXTENSION GRAPH:



namespace PX.Objects.AP

public class APInvoiceEntry_Extension : PXGraphExtension<APInvoiceEntry>

#region properties
public APRegister _currentDoc

get

return Base.Document.Current;



#endregion
// note

#region selects

public PXSelectJoin<
APRegisterException,
LeftJoin<APInvoice,
On<APRegisterException.aPRegisterRefNbr, Equal<APInvoice.refNbr>>>,
Where<APRegisterException.aPRegisterRefNbr, Equal<Current<APInvoice.refNbr>>>> Exceptions;

#endregion


#region Event Handlers
#endregion

#region Actions

public PXAction<APRegisterException> AdjustSalesTax;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Adj. Sales Tax")]
protected void adjustSalesTax()

// put code here to adjust sales tax



public PXAction<APInvoice> ApplyPriceException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Price Exc.")]
protected void applyPriceException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "PRC";
Exceptions.Insert(rException);


public PXAction<APInvoice> ApplyQtyException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Qty Exc.")]
protected void applyQtyException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "QTY";
Exceptions.Insert(rException);




public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Freight Exc.")]
protected void applyFreightException()

string exceptionMessage = string.Empty;

// insert freight exception code here
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a freight exception. n";
if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "FREIGHT";
rException.ExceptionType = "FRT";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Sales Tax Exc.")]
protected void applySalesTaxException()

string exceptionMessage = string.Empty;

if(_currentDoc.RefNbr == "<NEW>") exceptionMessage += "Please save the invoice before applying a sales tax exception. n";
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a sales tax exception. n";
//if(((APInvoice)_currentDoc).CuryTaxTotal == 0) exceptionMessage += "Tax total must be greate than $0.00 to apply a sales tax exception. n";

if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "SALES TAX";
rException.ExceptionType = "TAX";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


#endregion












share|improve this question


























  • Text and Code Format to make key points understandable

    – MAhipal Singh
    Mar 27 at 14:37

















0















SUMMARY



I have created a graph extension for the APInvoiceEntry graph (AP301000 screen), called APInvoiceEntry_Extension.



I created a new DB Table called APRegisterException, which stores exception information for SalesTax, Freight, Price, and Qty errors.There is a 1 to many relationship between APRegister and APRegisterException, indicating that a bill can have many different types of exceptions. For each of these exceptions, I created a button and an action to add Exceptions to the DAC within my extension graph.



THE PROBLEM



I am only able to add 1 new APRegisterExcetion record to the DAC. The DAC is not updating for multiple button clicks. Each of the following actions should create a new APRegisterException record, and add them to the Exceptions DAC within my graph.



public PXAction<APInvoice> ApplyPriceException;
public PXAction<APInvoice> ApplyQtyException;
public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;



note: the actions are executing, it's just the DAC that is not
updating.




CODE



APREgisterException DAC



namespace BillsAndAdjustmentsExt

[Serializable]
public class APRegisterException : IBqlTable

#region APRegisterRefNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Ref Nbr")]
public virtual string APRegisterRefNbr get; set;
public abstract class aPRegisterRefNbr : IBqlField
#endregion

#region APTranLineNbr
[PXDBInt()]
[PXUIField(DisplayName = "Line Nbr")]
public virtual int? APTranLineNbr get; set;
public abstract class aPTranLineNbr : IBqlField
#endregion

#region ExceptionDesc
[PXDBString(150, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string ExceptionDesc get; set;
public abstract class exceptionDesc : IBqlField
#endregion

#region ExceptionType
[PXDBString(3, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Exc. Type")]
public virtual string ExceptionType get; set;
public abstract class exceptionType : IBqlField
#endregion

#region ApprovedByID
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Approved By")]
public virtual string ApprovedByID get; set;
public abstract class approvedByID : IBqlField
#endregion

#region ApprovedDate
[PXDBDate()]
[PXUIField(DisplayName = "Approval Date")]
public virtual DateTime? ApprovedDate get; set;
public abstract class approvedDate : IBqlField
#endregion




EXTENSION GRAPH:



namespace PX.Objects.AP

public class APInvoiceEntry_Extension : PXGraphExtension<APInvoiceEntry>

#region properties
public APRegister _currentDoc

get

return Base.Document.Current;



#endregion
// note

#region selects

public PXSelectJoin<
APRegisterException,
LeftJoin<APInvoice,
On<APRegisterException.aPRegisterRefNbr, Equal<APInvoice.refNbr>>>,
Where<APRegisterException.aPRegisterRefNbr, Equal<Current<APInvoice.refNbr>>>> Exceptions;

#endregion


#region Event Handlers
#endregion

#region Actions

public PXAction<APRegisterException> AdjustSalesTax;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Adj. Sales Tax")]
protected void adjustSalesTax()

// put code here to adjust sales tax



public PXAction<APInvoice> ApplyPriceException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Price Exc.")]
protected void applyPriceException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "PRC";
Exceptions.Insert(rException);


public PXAction<APInvoice> ApplyQtyException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Qty Exc.")]
protected void applyQtyException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "QTY";
Exceptions.Insert(rException);




public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Freight Exc.")]
protected void applyFreightException()

string exceptionMessage = string.Empty;

// insert freight exception code here
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a freight exception. n";
if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "FREIGHT";
rException.ExceptionType = "FRT";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Sales Tax Exc.")]
protected void applySalesTaxException()

string exceptionMessage = string.Empty;

if(_currentDoc.RefNbr == "<NEW>") exceptionMessage += "Please save the invoice before applying a sales tax exception. n";
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a sales tax exception. n";
//if(((APInvoice)_currentDoc).CuryTaxTotal == 0) exceptionMessage += "Tax total must be greate than $0.00 to apply a sales tax exception. n";

if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "SALES TAX";
rException.ExceptionType = "TAX";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


#endregion












share|improve this question


























  • Text and Code Format to make key points understandable

    – MAhipal Singh
    Mar 27 at 14:37













0












0








0








SUMMARY



I have created a graph extension for the APInvoiceEntry graph (AP301000 screen), called APInvoiceEntry_Extension.



I created a new DB Table called APRegisterException, which stores exception information for SalesTax, Freight, Price, and Qty errors.There is a 1 to many relationship between APRegister and APRegisterException, indicating that a bill can have many different types of exceptions. For each of these exceptions, I created a button and an action to add Exceptions to the DAC within my extension graph.



THE PROBLEM



I am only able to add 1 new APRegisterExcetion record to the DAC. The DAC is not updating for multiple button clicks. Each of the following actions should create a new APRegisterException record, and add them to the Exceptions DAC within my graph.



public PXAction<APInvoice> ApplyPriceException;
public PXAction<APInvoice> ApplyQtyException;
public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;



note: the actions are executing, it's just the DAC that is not
updating.




CODE



APREgisterException DAC



namespace BillsAndAdjustmentsExt

[Serializable]
public class APRegisterException : IBqlTable

#region APRegisterRefNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Ref Nbr")]
public virtual string APRegisterRefNbr get; set;
public abstract class aPRegisterRefNbr : IBqlField
#endregion

#region APTranLineNbr
[PXDBInt()]
[PXUIField(DisplayName = "Line Nbr")]
public virtual int? APTranLineNbr get; set;
public abstract class aPTranLineNbr : IBqlField
#endregion

#region ExceptionDesc
[PXDBString(150, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string ExceptionDesc get; set;
public abstract class exceptionDesc : IBqlField
#endregion

#region ExceptionType
[PXDBString(3, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Exc. Type")]
public virtual string ExceptionType get; set;
public abstract class exceptionType : IBqlField
#endregion

#region ApprovedByID
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Approved By")]
public virtual string ApprovedByID get; set;
public abstract class approvedByID : IBqlField
#endregion

#region ApprovedDate
[PXDBDate()]
[PXUIField(DisplayName = "Approval Date")]
public virtual DateTime? ApprovedDate get; set;
public abstract class approvedDate : IBqlField
#endregion




EXTENSION GRAPH:



namespace PX.Objects.AP

public class APInvoiceEntry_Extension : PXGraphExtension<APInvoiceEntry>

#region properties
public APRegister _currentDoc

get

return Base.Document.Current;



#endregion
// note

#region selects

public PXSelectJoin<
APRegisterException,
LeftJoin<APInvoice,
On<APRegisterException.aPRegisterRefNbr, Equal<APInvoice.refNbr>>>,
Where<APRegisterException.aPRegisterRefNbr, Equal<Current<APInvoice.refNbr>>>> Exceptions;

#endregion


#region Event Handlers
#endregion

#region Actions

public PXAction<APRegisterException> AdjustSalesTax;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Adj. Sales Tax")]
protected void adjustSalesTax()

// put code here to adjust sales tax



public PXAction<APInvoice> ApplyPriceException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Price Exc.")]
protected void applyPriceException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "PRC";
Exceptions.Insert(rException);


public PXAction<APInvoice> ApplyQtyException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Qty Exc.")]
protected void applyQtyException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "QTY";
Exceptions.Insert(rException);




public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Freight Exc.")]
protected void applyFreightException()

string exceptionMessage = string.Empty;

// insert freight exception code here
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a freight exception. n";
if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "FREIGHT";
rException.ExceptionType = "FRT";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Sales Tax Exc.")]
protected void applySalesTaxException()

string exceptionMessage = string.Empty;

if(_currentDoc.RefNbr == "<NEW>") exceptionMessage += "Please save the invoice before applying a sales tax exception. n";
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a sales tax exception. n";
//if(((APInvoice)_currentDoc).CuryTaxTotal == 0) exceptionMessage += "Tax total must be greate than $0.00 to apply a sales tax exception. n";

if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "SALES TAX";
rException.ExceptionType = "TAX";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


#endregion












share|improve this question
















SUMMARY



I have created a graph extension for the APInvoiceEntry graph (AP301000 screen), called APInvoiceEntry_Extension.



I created a new DB Table called APRegisterException, which stores exception information for SalesTax, Freight, Price, and Qty errors.There is a 1 to many relationship between APRegister and APRegisterException, indicating that a bill can have many different types of exceptions. For each of these exceptions, I created a button and an action to add Exceptions to the DAC within my extension graph.



THE PROBLEM



I am only able to add 1 new APRegisterExcetion record to the DAC. The DAC is not updating for multiple button clicks. Each of the following actions should create a new APRegisterException record, and add them to the Exceptions DAC within my graph.



public PXAction<APInvoice> ApplyPriceException;
public PXAction<APInvoice> ApplyQtyException;
public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;



note: the actions are executing, it's just the DAC that is not
updating.




CODE



APREgisterException DAC



namespace BillsAndAdjustmentsExt

[Serializable]
public class APRegisterException : IBqlTable

#region APRegisterRefNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Ref Nbr")]
public virtual string APRegisterRefNbr get; set;
public abstract class aPRegisterRefNbr : IBqlField
#endregion

#region APTranLineNbr
[PXDBInt()]
[PXUIField(DisplayName = "Line Nbr")]
public virtual int? APTranLineNbr get; set;
public abstract class aPTranLineNbr : IBqlField
#endregion

#region ExceptionDesc
[PXDBString(150, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string ExceptionDesc get; set;
public abstract class exceptionDesc : IBqlField
#endregion

#region ExceptionType
[PXDBString(3, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Exc. Type")]
public virtual string ExceptionType get; set;
public abstract class exceptionType : IBqlField
#endregion

#region ApprovedByID
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Approved By")]
public virtual string ApprovedByID get; set;
public abstract class approvedByID : IBqlField
#endregion

#region ApprovedDate
[PXDBDate()]
[PXUIField(DisplayName = "Approval Date")]
public virtual DateTime? ApprovedDate get; set;
public abstract class approvedDate : IBqlField
#endregion




EXTENSION GRAPH:



namespace PX.Objects.AP

public class APInvoiceEntry_Extension : PXGraphExtension<APInvoiceEntry>

#region properties
public APRegister _currentDoc

get

return Base.Document.Current;



#endregion
// note

#region selects

public PXSelectJoin<
APRegisterException,
LeftJoin<APInvoice,
On<APRegisterException.aPRegisterRefNbr, Equal<APInvoice.refNbr>>>,
Where<APRegisterException.aPRegisterRefNbr, Equal<Current<APInvoice.refNbr>>>> Exceptions;

#endregion


#region Event Handlers
#endregion

#region Actions

public PXAction<APRegisterException> AdjustSalesTax;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Adj. Sales Tax")]
protected void adjustSalesTax()

// put code here to adjust sales tax



public PXAction<APInvoice> ApplyPriceException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Price Exc.")]
protected void applyPriceException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "PRC";
Exceptions.Insert(rException);


public PXAction<APInvoice> ApplyQtyException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Qty Exc.")]
protected void applyQtyException()

APTran row = Base.Transactions.Current;
if(row == null)

throw new PXException("No rows selected");


APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = row.RefNbr;
rException.APTranLineNbr = row.LineNbr;
rException.ExceptionDesc = row.TranDesc;
rException.ExceptionType = "QTY";
Exceptions.Insert(rException);




public PXAction<PX.Objects.AP.APInvoice> ApplyFreightException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Freight Exc.")]
protected void applyFreightException()

string exceptionMessage = string.Empty;

// insert freight exception code here
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a freight exception. n";
if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "FREIGHT";
rException.ExceptionType = "FRT";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


public PXAction<PX.Objects.AP.APInvoice> ApplySalesTaxException;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Apply Sales Tax Exc.")]
protected void applySalesTaxException()

string exceptionMessage = string.Empty;

if(_currentDoc.RefNbr == "<NEW>") exceptionMessage += "Please save the invoice before applying a sales tax exception. n";
if(_currentDoc.DocType != "INV" ) exceptionMessage += "Document type must be 'Bill' to apply a sales tax exception. n";
//if(((APInvoice)_currentDoc).CuryTaxTotal == 0) exceptionMessage += "Tax total must be greate than $0.00 to apply a sales tax exception. n";

if(!string.IsNullOrEmpty(exceptionMessage))

throw new PXException("One or more errors occured trying to save this record. n" + exceptionMessage);

// set the current document to hold
_currentDoc.Hold = true;

// create the exception record and store it in cache
APRegisterException rException = new APRegisterException();
rException.APRegisterRefNbr = _currentDoc.RefNbr;
rException.ExceptionDesc = "SALES TAX";
rException.ExceptionType = "TAX";

Exceptions.Insert(rException);
// Base.Actions.PressSave();


#endregion









c# graph acumatica dac






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 14:37









MAhipal Singh

2,87125 silver badges44 bronze badges




2,87125 silver badges44 bronze badges










asked Mar 27 at 13:22









Adam St.HilaireAdam St.Hilaire

104 bronze badges




104 bronze badges















  • Text and Code Format to make key points understandable

    – MAhipal Singh
    Mar 27 at 14:37

















  • Text and Code Format to make key points understandable

    – MAhipal Singh
    Mar 27 at 14:37
















Text and Code Format to make key points understandable

– MAhipal Singh
Mar 27 at 14:37





Text and Code Format to make key points understandable

– MAhipal Singh
Mar 27 at 14:37












2 Answers
2






active

oldest

votes


















0














From reviewing your DAC, it seems that you have only one key field which is the APRegisterRefNbr. The key already exists in the cache, so it cannot insert. If you are looking for a one-to-many, I would look at doing a auto-numbered key, and then a reference back to the line that it is affecting. For example, you could set your database key to be a bigint (if this table is going to get huge) and identity for autonumber in SQL, and then add this to your DAC:



[PXDBLongIdentity(IsKey = true)]
[PXUIField(DisplayName = "APRegisterExceptionID", Enabled = false)]
public virtual Int64? APRegisterExceptionID get; set;
public abstract class aPRegisterExceptionID: IBqlField


Then you have your unique ID, and can link back to the parent table using a PXSelector and PXParent.



#region APRegisterRefNbr 
[PXDBString(15)]
[PXSelector(typeof(APRegister.refNbr))]
[PXForeignReference(typeof(Field<APRegisterException.aPRegisterRefNbr>.IsRelatedTo<APRegister.refNbr>))]
[PXUIField(DisplayName = "APRegisterRefNbr")]
public virtual String APRegisterRefNbr get; set;
public abstract class aPRegisterRefNbr : IBqlField
#endregion


I have used a similar approach for many one-to-many relationship tables for components, and think it could work for you in this case.






share|improve this answer
































    0














    1. You do not appear to have defined a parent child relationship for your DAC utilizing the PXParent and PXDBDefault attribute on the APRegisterException class, as well as needing adjust your keys to accomplish the described business use case.

    2. Include restriction to DocType in the declared 'Exceptions' view else different document types could pull exceptions associated to other documents.


    3. Include audit fields as well as tstamp and noteID on APRegisterException.



       [Serializable]
      public class APRegisterException : IBqlTable

      #region APRegisterRefNbr
      [PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
      [PXUIField(DisplayName = "Ref Nbr")]
      [PXParent(typeof(Select<APInvoice, Where<APInvoice.refNbr, Equal<Current<APRegisterException.refNbr>>, And<APInvoice.docType, Equal<Current<APRegisterException.docType>>>>>))]
      [PXDBDefault(typeof(APInvoice.refNbr))]
      public virtual string APRegisterRefNbr get; set;
      public abstract class aPRegisterRefNbr : IBqlField
      #endregion

      #region APDocType
      [PXDBString(3, IsKey = true, IsUnicode = true, InputMask = "")]
      [PXUIField(DisplayName = "Doc Type")]
      [PXDBDefault(typeof(APInvoice.docType))]
      public virtual string APDocType get; set;
      public abstract class aPDocType: IBqlField
      #endregion

      #region ExceptionDesc
      [PXDBString(150, IsUnicode = true, InputMask = "")]
      [PXUIField(DisplayName = "Description")]
      public virtual string ExceptionDesc get; set;
      public abstract class exceptionDesc : IBqlField
      #endregion

      #region ExceptionType
      [PXDBString(3, IsUnicode = true, InputMask = "", IsKey = true)]
      [PXUIField(DisplayName = "Exc. Type")]
      public virtual string ExceptionType get; set;
      public abstract class exceptionType : IBqlField
      #endregion

      #region ApprovedByID
      [PXDBString(15, IsUnicode = true, InputMask = "")]
      [PXUIField(DisplayName = "Approved By")]
      public virtual string ApprovedByID get; set;
      public abstract class approvedByID : IBqlField
      #endregion

      #region ApprovedDate
      [PXDBDate()]
      [PXUIField(DisplayName = "Approval Date")]
      public virtual DateTime? ApprovedDate get; set;
      public abstract class approvedDate : IBqlField
      #endregion







    share|improve this answer



























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55378275%2fhow-to-properly-add-records-to-dac-through-pxactions-in-an-extension%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      From reviewing your DAC, it seems that you have only one key field which is the APRegisterRefNbr. The key already exists in the cache, so it cannot insert. If you are looking for a one-to-many, I would look at doing a auto-numbered key, and then a reference back to the line that it is affecting. For example, you could set your database key to be a bigint (if this table is going to get huge) and identity for autonumber in SQL, and then add this to your DAC:



      [PXDBLongIdentity(IsKey = true)]
      [PXUIField(DisplayName = "APRegisterExceptionID", Enabled = false)]
      public virtual Int64? APRegisterExceptionID get; set;
      public abstract class aPRegisterExceptionID: IBqlField


      Then you have your unique ID, and can link back to the parent table using a PXSelector and PXParent.



      #region APRegisterRefNbr 
      [PXDBString(15)]
      [PXSelector(typeof(APRegister.refNbr))]
      [PXForeignReference(typeof(Field<APRegisterException.aPRegisterRefNbr>.IsRelatedTo<APRegister.refNbr>))]
      [PXUIField(DisplayName = "APRegisterRefNbr")]
      public virtual String APRegisterRefNbr get; set;
      public abstract class aPRegisterRefNbr : IBqlField
      #endregion


      I have used a similar approach for many one-to-many relationship tables for components, and think it could work for you in this case.






      share|improve this answer





























        0














        From reviewing your DAC, it seems that you have only one key field which is the APRegisterRefNbr. The key already exists in the cache, so it cannot insert. If you are looking for a one-to-many, I would look at doing a auto-numbered key, and then a reference back to the line that it is affecting. For example, you could set your database key to be a bigint (if this table is going to get huge) and identity for autonumber in SQL, and then add this to your DAC:



        [PXDBLongIdentity(IsKey = true)]
        [PXUIField(DisplayName = "APRegisterExceptionID", Enabled = false)]
        public virtual Int64? APRegisterExceptionID get; set;
        public abstract class aPRegisterExceptionID: IBqlField


        Then you have your unique ID, and can link back to the parent table using a PXSelector and PXParent.



        #region APRegisterRefNbr 
        [PXDBString(15)]
        [PXSelector(typeof(APRegister.refNbr))]
        [PXForeignReference(typeof(Field<APRegisterException.aPRegisterRefNbr>.IsRelatedTo<APRegister.refNbr>))]
        [PXUIField(DisplayName = "APRegisterRefNbr")]
        public virtual String APRegisterRefNbr get; set;
        public abstract class aPRegisterRefNbr : IBqlField
        #endregion


        I have used a similar approach for many one-to-many relationship tables for components, and think it could work for you in this case.






        share|improve this answer



























          0












          0








          0







          From reviewing your DAC, it seems that you have only one key field which is the APRegisterRefNbr. The key already exists in the cache, so it cannot insert. If you are looking for a one-to-many, I would look at doing a auto-numbered key, and then a reference back to the line that it is affecting. For example, you could set your database key to be a bigint (if this table is going to get huge) and identity for autonumber in SQL, and then add this to your DAC:



          [PXDBLongIdentity(IsKey = true)]
          [PXUIField(DisplayName = "APRegisterExceptionID", Enabled = false)]
          public virtual Int64? APRegisterExceptionID get; set;
          public abstract class aPRegisterExceptionID: IBqlField


          Then you have your unique ID, and can link back to the parent table using a PXSelector and PXParent.



          #region APRegisterRefNbr 
          [PXDBString(15)]
          [PXSelector(typeof(APRegister.refNbr))]
          [PXForeignReference(typeof(Field<APRegisterException.aPRegisterRefNbr>.IsRelatedTo<APRegister.refNbr>))]
          [PXUIField(DisplayName = "APRegisterRefNbr")]
          public virtual String APRegisterRefNbr get; set;
          public abstract class aPRegisterRefNbr : IBqlField
          #endregion


          I have used a similar approach for many one-to-many relationship tables for components, and think it could work for you in this case.






          share|improve this answer













          From reviewing your DAC, it seems that you have only one key field which is the APRegisterRefNbr. The key already exists in the cache, so it cannot insert. If you are looking for a one-to-many, I would look at doing a auto-numbered key, and then a reference back to the line that it is affecting. For example, you could set your database key to be a bigint (if this table is going to get huge) and identity for autonumber in SQL, and then add this to your DAC:



          [PXDBLongIdentity(IsKey = true)]
          [PXUIField(DisplayName = "APRegisterExceptionID", Enabled = false)]
          public virtual Int64? APRegisterExceptionID get; set;
          public abstract class aPRegisterExceptionID: IBqlField


          Then you have your unique ID, and can link back to the parent table using a PXSelector and PXParent.



          #region APRegisterRefNbr 
          [PXDBString(15)]
          [PXSelector(typeof(APRegister.refNbr))]
          [PXForeignReference(typeof(Field<APRegisterException.aPRegisterRefNbr>.IsRelatedTo<APRegister.refNbr>))]
          [PXUIField(DisplayName = "APRegisterRefNbr")]
          public virtual String APRegisterRefNbr get; set;
          public abstract class aPRegisterRefNbr : IBqlField
          #endregion


          I have used a similar approach for many one-to-many relationship tables for components, and think it could work for you in this case.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 20:20









          KRichardsonKRichardson

          6775 silver badges11 bronze badges




          6775 silver badges11 bronze badges


























              0














              1. You do not appear to have defined a parent child relationship for your DAC utilizing the PXParent and PXDBDefault attribute on the APRegisterException class, as well as needing adjust your keys to accomplish the described business use case.

              2. Include restriction to DocType in the declared 'Exceptions' view else different document types could pull exceptions associated to other documents.


              3. Include audit fields as well as tstamp and noteID on APRegisterException.



                 [Serializable]
                public class APRegisterException : IBqlTable

                #region APRegisterRefNbr
                [PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
                [PXUIField(DisplayName = "Ref Nbr")]
                [PXParent(typeof(Select<APInvoice, Where<APInvoice.refNbr, Equal<Current<APRegisterException.refNbr>>, And<APInvoice.docType, Equal<Current<APRegisterException.docType>>>>>))]
                [PXDBDefault(typeof(APInvoice.refNbr))]
                public virtual string APRegisterRefNbr get; set;
                public abstract class aPRegisterRefNbr : IBqlField
                #endregion

                #region APDocType
                [PXDBString(3, IsKey = true, IsUnicode = true, InputMask = "")]
                [PXUIField(DisplayName = "Doc Type")]
                [PXDBDefault(typeof(APInvoice.docType))]
                public virtual string APDocType get; set;
                public abstract class aPDocType: IBqlField
                #endregion

                #region ExceptionDesc
                [PXDBString(150, IsUnicode = true, InputMask = "")]
                [PXUIField(DisplayName = "Description")]
                public virtual string ExceptionDesc get; set;
                public abstract class exceptionDesc : IBqlField
                #endregion

                #region ExceptionType
                [PXDBString(3, IsUnicode = true, InputMask = "", IsKey = true)]
                [PXUIField(DisplayName = "Exc. Type")]
                public virtual string ExceptionType get; set;
                public abstract class exceptionType : IBqlField
                #endregion

                #region ApprovedByID
                [PXDBString(15, IsUnicode = true, InputMask = "")]
                [PXUIField(DisplayName = "Approved By")]
                public virtual string ApprovedByID get; set;
                public abstract class approvedByID : IBqlField
                #endregion

                #region ApprovedDate
                [PXDBDate()]
                [PXUIField(DisplayName = "Approval Date")]
                public virtual DateTime? ApprovedDate get; set;
                public abstract class approvedDate : IBqlField
                #endregion







              share|improve this answer





























                0














                1. You do not appear to have defined a parent child relationship for your DAC utilizing the PXParent and PXDBDefault attribute on the APRegisterException class, as well as needing adjust your keys to accomplish the described business use case.

                2. Include restriction to DocType in the declared 'Exceptions' view else different document types could pull exceptions associated to other documents.


                3. Include audit fields as well as tstamp and noteID on APRegisterException.



                   [Serializable]
                  public class APRegisterException : IBqlTable

                  #region APRegisterRefNbr
                  [PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
                  [PXUIField(DisplayName = "Ref Nbr")]
                  [PXParent(typeof(Select<APInvoice, Where<APInvoice.refNbr, Equal<Current<APRegisterException.refNbr>>, And<APInvoice.docType, Equal<Current<APRegisterException.docType>>>>>))]
                  [PXDBDefault(typeof(APInvoice.refNbr))]
                  public virtual string APRegisterRefNbr get; set;
                  public abstract class aPRegisterRefNbr : IBqlField
                  #endregion

                  #region APDocType
                  [PXDBString(3, IsKey = true, IsUnicode = true, InputMask = "")]
                  [PXUIField(DisplayName = "Doc Type")]
                  [PXDBDefault(typeof(APInvoice.docType))]
                  public virtual string APDocType get; set;
                  public abstract class aPDocType: IBqlField
                  #endregion

                  #region ExceptionDesc
                  [PXDBString(150, IsUnicode = true, InputMask = "")]
                  [PXUIField(DisplayName = "Description")]
                  public virtual string ExceptionDesc get; set;
                  public abstract class exceptionDesc : IBqlField
                  #endregion

                  #region ExceptionType
                  [PXDBString(3, IsUnicode = true, InputMask = "", IsKey = true)]
                  [PXUIField(DisplayName = "Exc. Type")]
                  public virtual string ExceptionType get; set;
                  public abstract class exceptionType : IBqlField
                  #endregion

                  #region ApprovedByID
                  [PXDBString(15, IsUnicode = true, InputMask = "")]
                  [PXUIField(DisplayName = "Approved By")]
                  public virtual string ApprovedByID get; set;
                  public abstract class approvedByID : IBqlField
                  #endregion

                  #region ApprovedDate
                  [PXDBDate()]
                  [PXUIField(DisplayName = "Approval Date")]
                  public virtual DateTime? ApprovedDate get; set;
                  public abstract class approvedDate : IBqlField
                  #endregion







                share|improve this answer



























                  0












                  0








                  0







                  1. You do not appear to have defined a parent child relationship for your DAC utilizing the PXParent and PXDBDefault attribute on the APRegisterException class, as well as needing adjust your keys to accomplish the described business use case.

                  2. Include restriction to DocType in the declared 'Exceptions' view else different document types could pull exceptions associated to other documents.


                  3. Include audit fields as well as tstamp and noteID on APRegisterException.



                     [Serializable]
                    public class APRegisterException : IBqlTable

                    #region APRegisterRefNbr
                    [PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Ref Nbr")]
                    [PXParent(typeof(Select<APInvoice, Where<APInvoice.refNbr, Equal<Current<APRegisterException.refNbr>>, And<APInvoice.docType, Equal<Current<APRegisterException.docType>>>>>))]
                    [PXDBDefault(typeof(APInvoice.refNbr))]
                    public virtual string APRegisterRefNbr get; set;
                    public abstract class aPRegisterRefNbr : IBqlField
                    #endregion

                    #region APDocType
                    [PXDBString(3, IsKey = true, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Doc Type")]
                    [PXDBDefault(typeof(APInvoice.docType))]
                    public virtual string APDocType get; set;
                    public abstract class aPDocType: IBqlField
                    #endregion

                    #region ExceptionDesc
                    [PXDBString(150, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Description")]
                    public virtual string ExceptionDesc get; set;
                    public abstract class exceptionDesc : IBqlField
                    #endregion

                    #region ExceptionType
                    [PXDBString(3, IsUnicode = true, InputMask = "", IsKey = true)]
                    [PXUIField(DisplayName = "Exc. Type")]
                    public virtual string ExceptionType get; set;
                    public abstract class exceptionType : IBqlField
                    #endregion

                    #region ApprovedByID
                    [PXDBString(15, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Approved By")]
                    public virtual string ApprovedByID get; set;
                    public abstract class approvedByID : IBqlField
                    #endregion

                    #region ApprovedDate
                    [PXDBDate()]
                    [PXUIField(DisplayName = "Approval Date")]
                    public virtual DateTime? ApprovedDate get; set;
                    public abstract class approvedDate : IBqlField
                    #endregion







                  share|improve this answer













                  1. You do not appear to have defined a parent child relationship for your DAC utilizing the PXParent and PXDBDefault attribute on the APRegisterException class, as well as needing adjust your keys to accomplish the described business use case.

                  2. Include restriction to DocType in the declared 'Exceptions' view else different document types could pull exceptions associated to other documents.


                  3. Include audit fields as well as tstamp and noteID on APRegisterException.



                     [Serializable]
                    public class APRegisterException : IBqlTable

                    #region APRegisterRefNbr
                    [PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Ref Nbr")]
                    [PXParent(typeof(Select<APInvoice, Where<APInvoice.refNbr, Equal<Current<APRegisterException.refNbr>>, And<APInvoice.docType, Equal<Current<APRegisterException.docType>>>>>))]
                    [PXDBDefault(typeof(APInvoice.refNbr))]
                    public virtual string APRegisterRefNbr get; set;
                    public abstract class aPRegisterRefNbr : IBqlField
                    #endregion

                    #region APDocType
                    [PXDBString(3, IsKey = true, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Doc Type")]
                    [PXDBDefault(typeof(APInvoice.docType))]
                    public virtual string APDocType get; set;
                    public abstract class aPDocType: IBqlField
                    #endregion

                    #region ExceptionDesc
                    [PXDBString(150, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Description")]
                    public virtual string ExceptionDesc get; set;
                    public abstract class exceptionDesc : IBqlField
                    #endregion

                    #region ExceptionType
                    [PXDBString(3, IsUnicode = true, InputMask = "", IsKey = true)]
                    [PXUIField(DisplayName = "Exc. Type")]
                    public virtual string ExceptionType get; set;
                    public abstract class exceptionType : IBqlField
                    #endregion

                    #region ApprovedByID
                    [PXDBString(15, IsUnicode = true, InputMask = "")]
                    [PXUIField(DisplayName = "Approved By")]
                    public virtual string ApprovedByID get; set;
                    public abstract class approvedByID : IBqlField
                    #endregion

                    #region ApprovedDate
                    [PXDBDate()]
                    [PXUIField(DisplayName = "Approval Date")]
                    public virtual DateTime? ApprovedDate get; set;
                    public abstract class approvedDate : IBqlField
                    #endregion








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 27 at 20:25









                  Joshua Van HoesenJoshua Van Hoesen

                  8917 silver badges24 bronze badges




                  8917 silver badges24 bronze badges






























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55378275%2fhow-to-properly-add-records-to-dac-through-pxactions-in-an-extension%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                      Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript