Loading ...

Pxuirequired Attribute Usage In Acumatica

Hello everybody,

today I want to say a bit more about usage of attribute PXUIRequired as previous article on my blog wasn't very easy to follow by some of my readers.

Take a look on presented code sample:

public class sOOrderType : Constant<string>
{
	public const string SOOrderType = "SO";
	public sOOrderType() : base(SOOrderType)
	{	
	}
}
 
public class SOOrderExt : PXCacheExtension<SOOrder>
{
	[PXMergeAttributes(Method = MergeMethod.Append)]
	[PXDefault]
	[PXUIRequired(typeof(Where<SOOrder.orderTypeEqual<sOOrderType>>))]
	public virtual string CustomerOrderNbr { getset; }
}

As you can see, besides attribute PXUIRequired it has declaration of constant value "SO". With that declaration before class you may get validation only for SO Order type "SO".

And now as you see on screenshot, field Customer Order got it's star. Take notice that color of that star is also differnet, it become red.

One more point which I want to underline, attribute PXUIRequired will work in connection with PXDefault attriubute. Without PXDefault attribute you'll get another error message, so as as summary, use PXUIRequired attribute with PXDefault.

Ready to take your Acumatica customization to the next level?

If you found this article helpful and you're looking for tailored solutions to optimize your Acumatica system, don't hesitate to leave a request for customization! Whether you're aiming for more efficient data validation or complex functionality, we're here to make your vision a reality.

Contact us today to discuss your needs and explore how we can enhance your Acumatica experience!

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5