Error if You Remove the Default Price List Field from a Form and then Add it Back
Posted April 9th, 2010 / No Comments
Nothing good, that’s for sure. You probably won’t know until you encounter a similar problem, but there is actually hidden javascript code on the form that invokes actions when this field is selected. When you remove the field from the form, so goes the code. If you decide to put it back on the form, the code doesn’t come back with it. The main result of this is that when you try to select a Default Price List using this lookup, nothing is returned in the lookup list, even if you have values. Therefore, you cannot add Products to Opportunities.
To get the code back on the form, perform the following:
1) Export the customization xml of the entity in question after you have added the Default Price List back to the form.
2) Open the xml in a text editor.
3) Search for the text “Price List”.
4) Between the </labels> and <control tags for this field, paste the following text:
<events>
<event application=”true” active=”true”>
<script>
<![CDATA[
var oLookup = event.srcElement;
AddTransactionCurrencyParam(oLookup);]]>
</script>
<dependencies>
<dependency />
</dependencies>
</event>
</events>
5) Save the xml and import back into CRM.


