<?xml version="1.0" encoding="utf-16"?><customize><COR_CUSTOM_FIELD U_RuleName="BUP_10148: Decide if currency should be changed" U_Type="0" U_Action="0" U_Warning="N" U_WarningText="" U_WarningBox="N" U_WarningStatus="N" U_Active="Y" U_FormTypeBasis="" U_ItemUIDBasis="" U_ColumnBasis="" U_FormType="134" U_ItemUID="11" U_Column="" U_EventType="-2" U_Before="Y" U_Mode="-1" U_Refresh="N" U_EasyFunctionRule="" U_Creator="1" U_LastModified="13.07.2012 17:14:44" U_LastModifiedBy="1" U_Permission="" U_ErrorBox="N" U_ErrorStatus="N"><U_Expression>/****** General Information *****Creator: coresystems ag, muf@coresystems.chCreate Date: 2012-07-13 ***** StartConfDesc *****Give a warning if the user changes the business partner currency to all currencies and cancel the action if the user selects this.This is a sample customize rule to ask the user if he wants to continue an action or not. If the user selects "Cancel", nothing will happen. If the usre select "OK" the currency will not changeThe default option in this example is Cancel.***** EndConfDesc ***** ***** Updates *****2012-07-13, muf: Initial rule*/string ruleName = pVal.RuleInfo.RuleName.ToString();string errorMessage = "Error in Optimizer Rule '" + ruleName + "'";string askMessage = "Do you want to change the business partner currency?";string cancel = "No";string ok = "Yes"; try{	//StatusBar.WriteWarning("DEBUG - Rule: " + ruleName + " was triggered.");	// Ask if the action should be executed	SwissAddonFramework.UI.Dialogs.MessageBox.Buttons btnClick;	// The strings are defined in the parameters above. The default button is the cancel button	btnClick = SwissAddonFramework.UI.Dialogs.MessageBox.Show(askMessage, ok, cancel, SwissAddonFramework.UI.Dialogs.MessageBox.Buttons.Button2);	if (btnClick == SwissAddonFramework.UI.Dialogs.MessageBox.Buttons.Button2){		// User clicked on "NO" &gt; end the process and return false to cancel the action		return false;	}	// return true and allow the currency to change	return true;} catch(System.Exception ex){	StatusBar.WriteError(errorMessage + ": " + ex.Message);	Debug.WriteMessage(errorMessage + ": " + ex.Message, Debug.DebugLevel.Exception);}return true;</U_Expression></COR_CUSTOM_FIELD></customize>