In quote entry, I’m trying to save a couple of calculated fields into UD fields. The fields are quoteqty.calcunitcost, quoteqty.quotedprofit, and quoteqty.wqunitprice. I was able to successfully do this in classic, but need to get this customization over to kinetic. I’ve been trying to setup an event on the calcunitcost for testing, with a trigger on the dataview, hook: row changed, and target of quoteqty.calcunitcost. From there, I did a row-update and in the parameters I put the epibinding to my ud field and the value of “{QuoteQty.CalcUnitCost}”. So far, nothing is being stored. I’m wondering if I either have the wrong trigger or if the value needs to be entered differently since I’m working with a dataview value. Any suggestions would be greatly appreciated.
Column Changed (“Parent Column” let’s say…) > Row Update > (Child Column “Table.UDColumn” = %value%
%value%
– contains the changing value.
You will need to call an ‘Update’ event to save the record to the database. You will find the sweet spot by using your debugging tools - F12 > Console > CTRL+ALT+8 to find the correct event to hang off.
Hope this helps
PS. You could do this via a BPM also… (my preferred method)
Aaron, Thanks for the info. I’ll give it a try today. Can you reference a calculated field (field is not stored in a db table) from the quote screen in a BPM? I tried this back in classic and that didn’t work so that’s why I had to create a customization on the screen.
BPMs will pick up your UD fields related to that table — for example, if you’ve created a BPM on SalesOrder.Update
and want to update OrderDtl.Popcorn_c
, it’ll be available in the Set Field widget. Just remember, you’ll also need to handle the actual update afterward so the record gets saved properly. It’s usually best to hook in Before Update — or After, if UpdateExt
is being used.
There are hundreds of examples floating around here if you need one!
I get the part that the UD field will be picked up, but in my case, I’m looking to grab the QuoteQty.CalcUnitCost calculated field from the quote screen. That field is not stored in the db so I’m still wondering how I would be able to reference that in a BPM.
Thank you, I understand now
You can’t simply put. Your only option is to pull the screen value with my initial response and store it. If I find some time. I will do a step by step guide for you.
Hey Ben, curious about the above quoted bit from your OP.
If you’re looking for a value of a specific field (column) change to trigger an event… you may want to set your trigger to:
DataTable
Column Changed
Target: QuoteQty
Columns: CalcUnitCost
I’m thinking your row update may not be setting your value because, although the value is changing, you’re still on the same ROW. What you may be looking for is when the COLUMN changes.
Even though it is not a db field, it IS included in a dataview. Therefore, the value is held in that dataview during your quote entry session(s). So, the value IS there (locally) during runtime for you to grab and plug into another column for long-term storage (server-side).
Hi David,
Yeah, I had tried that the other day as well for a trigger, but it still wasn’t working. Maybe my missing link is to have the update event added so the record actually gets saved?
Is the row-update working to the point that you can see the value in your UD column?
You can see the values held in a particular dataview in the debugger.
OR, if you added a quick number box somewhere on the screen bound to QuoteQty.TotalCost_c… do you see a value populate there after your event runs?
And yes, the row-update will (hopefully) set the value LOCALLY… but you’ll need to call an update event that saves the value to the server. Again, you can test this by clicking the existing save button and see if your UD column value saves in the DB table. UD Columns should save along with the rest of the updated dataset.
I added the ud field into a number box and ran a debug. Currently the field is staying at 0 so it looks like my event for capturing the value is not working.
Do you see your event firing in the debugger when the original column’s value changes?
After further testing, I was able to see the event triggering from the debugger, but it is not copying anything to my ud field. I even tried a different action for dataview copy and then a data commit, but still no dice. Why does this have to be so hard? I thought app studio was going to be easy, but just another headache.
I played around a little this morning. I’m assuming you are making this customization on the Quote Engineering form?
The only Trigger I could really get to work was:
Event
After
ColumnChanged_QuoteQtyUnitPriceMarkupCommission
Then a row update
I could then see anytime the QuoteQty.CalcUnitCost changed, my test column (TransView.CalcUnitCost) would also change:
If you’re seeing your event fire… then it could just be a syntax on setting the value. So, perhaps the snip of my row-update above may help?
David,
Thank you so much! That event did it. I appreciate your help on this.