I have created custom fields on the QuoteQty table. How would I go about capturing the calculated fields on the Quote Worksheet tab of the Opportunity / Quote Tracker (or entry) forms?
I saw someone else mention capturing the quote cost fields in a custom field on an event but not sure how to do that. I’m assuming a form event but what event type should I use and how would I “capture” when said event happens? Would these “captured” values appear in a BAQ?
Should the custom field(s) be bound to the control I’ll be “capturing” these costs in?
You are going to have to define what you are attempting to do a little better. Do you want this event to be user controlled? In that case it would a button with a click event. If you want it to automatically happen, then you will hang it off an event. Which one will be determined by when you want it to save.
All of this is determined by what your use case requires.
Sorry, I lacked a little context behind what the goal is.
Not user controlled. We would like to capture the costs, automatically, when a quote is created or modified, inside of a UD field, for each quote quantity. Ultimately we would like it to work for all quotes in our system but even if we can only capture values moving forward on new quotes that’s okay.
I want to be able to see these captured values inside a BAQ so I can build a SQL report from it, if possible.
We have very complex BoMs with price break quantities on some materials. Also, some materials are manufactured and have their costs broken out into subcontract, material burden and labor\burden costs. Calculating the quote costs is almost impossible with all the different variables in our manufacturing processes. I can come really close on some quotes while others I’m hundreds of dollars off. I’ve tried calculating them out but quickly realized that would be a nightmare. I have a feeling that capturing the values and storing them in a UD field would be the better option.
You’re event is going to be on save then. There are a lot of moving pieces and a plethora of options though that might be hard to explain in a single post. You can do this in a BPM or a client side customization. What do you already know how to do?
You could also put an event on field change as well. Bind your UD field to the text box, then update on field change. You will probably need to capture more that one field that way. Save should write the value for you out of the box then.
I’m familiar with client side customization and c#. I already have custom defined fields on the QuoteQty table, with text boxes binded to my UD fields on the Quote Worksheet. I was leaning towards “AfterFieldChange” event. I’m not sure what to write in the event code to make it save the value to my UD field.
I haven’t. I do have VS on my workstation though. Between you, Chris Conn and Jose I’ve picked up a lot of answers just surfing\browsing the forum. So thank you for the help!
Ok, so I’ve been corrected(ish). That way will work, but it’s better to use the data_view so that any events that you may make in the future will fire correctly. Use this instead. replace CustomField_c with whatever your UD field is.
It now grabs the value and displays it in my text box but it’s not being committed or “captured”. The value does not appear inside a BAQ. Is it even possible to capture these values and store them on the QuoteQty table? I tried adding oTrans.Update() at the end but get a reference missing error.
Save on the customization? Of course. I even close and reopen the forms I’m customizing. This is being done on the quote tracker screen though, perhaps I need to do this on the quote entry screen instead? I can give that a shot. Quote Tracker doesn’t allow me to “save” since nothing is being changed there.
Ok, start over with entry, and start with just your field /text box and make sure you can type something in and hit save. Once that works, then add your events and the code.
Okay, I started over, using Quote Entry. I have it working now but not the way I was hoping. I built a function and attached it to a button they already use on every quote, to update some other fields. This will work for us moving forward. Below is our solution. Thank you again!