BPM to set the value in a dropdown on Quote Header

Hi all,

I have been asked to create a BPM which will set the value of a dropdown box on the Quote Header whenever the quote is converted to an order.
I thought this would be quite easy but I can’t get it to work. I have created a pre prossesing method directive,

I want to set the UD dropdown to RS_Ordered, this value exists in the user codes and I can select it manually, but the dropdown is staying blank whenever I convert a quote.

Any help would be much appreciated.

Thanks

Adrian.

Hi Adrian, I checked with one of our developers here at Quartz and he gave me this information…
My guess would be to try a pre/post.
The pre would identify only that the post processing needs to be turned on.
The post-processing would most likely be “Custom Code”.
Because it’s post-processing you’d need to set both the tt value and the actual DB value.

Hope this helps

1 Like

One way you might try is a method directive on Erp.Quote.CreateOrder.
In your pre-processing, store the value of the quote in a call context variable, just like Ken suggested.

In the post processing, you could use a custom code block to write an update to the original quote in which you are trying up update.

The code would look something like this:

Erp.Tables.QuoteHed QuoteHed;
QuoteHed = (from QuoteHed_row in Db.QuoteHed		
		where QuoteHed_row.Company == Session.CompanyID
		&& QuoteHed_row.QuoteNum == callContextBpmData.Number01 //or whatever variable your're using
		select QuoteHed_row).FirstOrDefault();
              if(QuoteHed!=null)
{
	QuoteHed.YourField = "YourValue"; //if setting a non-custom field
	QuoteHed["YourField_c"]= "YourValue"; //if setting custom field
}

Try that and let me know if it works

1 Like

Ken / Aaron,

Thank you both so much for your help with this. I am pleased to say that I have it working thanks to your perfect example Aaron. The only downside is that I will probably get more BPMs to do now…so I will be back!
Thank you both once again

Adrian.

1 Like