By using this website, you agree to our Terms of Use (click here)
I have created a new field to calculate commissions for specific buyers for my company. How do I multiply a value by a constant? Everything I am seeing requires a field as a parameter. Here is what I have and what I want:
[PXFormula(typeof(Mult{POReceiptExt.usrCommPcnt, POReceipt.curyOrderTotal}))] //replaced angle brackets with curly brackets, due to AUG formatting
[PXFormula(typeof(Mult{0.05, POReceipt.curyOrderTotal}))] //replaced angle brackets with curly brackets, due to AUG formatting
I have tried casting it into quotes, adding an "m" after the value, etc. But this function appears to only accept table fields. Any thoughts? I need this to execute once and be done, otherwise I'd override a handler like "row updating" or something.
I had previously set usrCommPcnt as a non-persistent value, but then I couldn't release the POReceipt. I'm debating making it a DBColumn just to force this to work, but it feels like bloat that shouldn't be necessary. Anyone know how to toss a constant into things like Mult and Where functions?
The question above is the tip of the iceberg for this issue. What I'm really trying to do is pull the VendorID on a POReceipt, then grab the Buying Agent from the Vendor Table. Once I know the agent, I'm entering a Switch/Case/Where brick to sort out the commission percentages based on the agent. Right now my main issue seems to be avoiding variable bloat and using constants in these functions.
Hmmm, I'd recommend asking this on StackOverflow. Once you cross the line into C# and the Framework, I'm pretty useless.
https://stackoverflow.com/questions/tagged/acumatica
