Update QuoteDtl_UD field to Match part_UD field

I have read many similar posts on this but can’t get to a working answer.

I have set up a required UD field on the Part_UD table to force anyone entering a new part to fill in which section it should belong to when quoted.

(Our quotes print near enough like essays, full of subcategories).

I am able to display this Part_ud field in the Quote line, so that the sales rep can see where to expect this line to appear on the quote, however this is via foreign key view customization.

Ideally I would like to automatically update the QuoteDtl_UD equivalent field to store the same (string) data for that part, to make it easier to report on.

The two fields are:
Part_UD.QuoteSection_c
QuoteDtl_UD.QuoteSection_c

When a new quote line is added to a quote, on pulling in the part number, I would like the QuoteDtl_UD.QuoteSection_cfield to match the corresponding Part_UD.QuoteSection_c field, based on the part number.

I have tried:

  • A pre processing BPM on erp.quote update on the ttQuoteDtl table, using ‘execute code’
    and ‘set field’ using custom code and am getting into a mess.

I’m OK until it comes to custom code - so please feel free to dumb your reply down, I won’t be offended!

Hi Karen,

Hopefully I’m not telling you of a method that’s not preferred by experts here, as I’m not expert either, but have worked on similar tasks as yours. The problem I’m having with below is with the quantity update business, which seems to be throwing the update off when I put quantity in for a new line. I’m not sure if it’s due to other customizations/bpms etc. or going to be there for you too. However, I do see this code working on QuoteDtl post processing Update bpm method sometimes (leave qty = 0). It could also work in Data directive for a changed QuoteDtl.PartNum field, but I wasn’t sure what to do about new…So, it works, and I recommend you consider it and tweak condition until you get it doing it all the time.

My condition:

My code:

Hopefully this helps you get there.

Nancy

3 Likes

Thank you so much, I will take a look at this.

1 Like

Thank you - this works when first creating the line in the quote.
It doesn’t update if I change the partnum but that’s fine, I can work with what you have given me so far.

edit - added a new condition to also run when the partnum is changed from any to another, then set the field as per above and that works too now, when changing the partnum :slight_smile:

1 Like