Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

For a custom lookup style column FX_Currency_RecID on the Sales Order form. The field will be populated by clicking the lookup button and selecting from currencies on the existing FX_Currency table. The existing form under System Settings > Foreign Exchange > Currencies will be used to maintain the list of foreign currencies for the sales order form.

The end result will look like this on the sales order form:

To create the lookup column, complete the following steps:

  1. Create a new C# Plugin called Demo FX Lookup on sales order



  2. Select custom fields tab and select Sales order row under the Modules grid. In the fields grid, enter the Name as  FX_Currency_RecID and choose cell type of Lookup. Press Save.

     

  3.  Select the Code tab and double click on CustomFieldPlugin to expand the code block.  Paste the following code into the ButtonClicked event:

    ButtonClicked event
    		if (CustomField.PluginCustomField.Name == "FX_Currency_RecID") 
    		{
    			var Currency = new JiwaFinancials.Jiwa.JiwaApplication.Entities.ForeignExchange.Currency();
    
    			Currency.Search(FormObject.Form);
    			CustomFieldValue.DisplayContents = Currency.ShortName;
    			CustomFieldValue.Contents = Currency.RecID;
    			
    		}

 

 

 

 

 

  • No labels