Skip to main content

Hi guys, I created a condition called IsExempt below, the Tax Zone on a Customer record is set to PAEXEMPT

 

 

 

I then added the Tax Registration ID field and used the IsExempt condition in the Required column.

 

My expectation in doing this would be that whenever the TaxZoneID = PAEXEMPT then the Tax Reg field would be required, but this is not working and I need some guidance.  Thanks!

 

 

Hi @dgross54,

Could you please check the below link:

https://stackoverflow.com/questions/31807310/how-to-make-field-conditionally-required-in-acumatica

 

 

I hope it helps you!

Moulali Shaik.


UPdate: I tried the exact same thing for Customer Locations and it worked as expected.  I just don’t understand why it’s not working in the Customer screen.  Below is a comparison of the conditions, the only thing different is that the Customer Location condition differentiates between the Vendor (V) and the Customer (C).

 

 


@MoulaliShaik79   Thanks but I am not a coder and this is 7 years old.  Acumatica built this to work, and it does except for this one.  This is the first time it has not worked for me.


UPdate: I tried the exact same thing for Customer Locations and it worked as expected.  I just don’t understand why it’s not working in the Customer screen.  Below is a comparison of the conditions, the only thing different is that the Customer Location condition differentiates between the Vendor (V) and the Customer (C).

 

 

In looking at the DAC for this, it looks like the display name is just there to reference the separation of Customer vs Vendor.  I would try it again, but if it doesn’t work, I would submit a ticket to Acumatica for support.  

 

 


The issue may be with the fact that the shipping tab’s tax zone actually refers to the default location. The options available in the dropdown are only available for the main DAC. 

I would add the following code into a Graph Extension of CustomerMaint to accomplish this.

 


public class CustomerMaint_Extension : PXGraphExtension<CustomerMaint>
{

//declare constant for required value
public const string PAExempt = "PAEXEMPT";
public class pAExempt : PX.Data.BQL.BqlString.Constant<pAExempt> { public pAExempt() : base(PAExempt) {; } }

//merge the following attributes to the cache attached field, taxRegistrationID
PXMergeAttributes(Method = MergeMethod.Merge)]
//required for PXUIRequired
PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
//require if the default location's tax zone is PAEXEMPT
PXUIRequired(typeof(Where<Selector<Customer.defLocationID, Location.cTaxZoneID>, Equal<pAExempt>>))]
public virtual void _(Events.CacheAttached<Customer.taxRegistrationID> e) { }
}

 


The issue may be with the fact that the shipping tab’s tax zone actually refers to the default location. The options available in the dropdown are only available for the main DAC. 

I would add the following code into a Graph Extension of CustomerMaint to accomplish this.

 


public class CustomerMaint_Extension : PXGraphExtension<CustomerMaint>
{

//declare constant for required value
public const string PAExempt = "PAEXEMPT";
public class pAExempt : PX.Data.BQL.BqlString.Constant<pAExempt> { public pAExempt() : base(PAExempt) {; } }

//merge the following attributes to the cache attached field, taxRegistrationID
PXMergeAttributes(Method = MergeMethod.Merge)]
//required for PXUIRequired
PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
//require if the default location's tax zone is PAEXEMPT
PXUIRequired(typeof(Where<Selector<Customer.defLocationID, Location.cTaxZoneID>, Equal<pAExempt>>))]
public virtual void _(Events.CacheAttached<Customer.taxRegistrationID> e) { }
}

 

This code is not work


Reply