Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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:

    Code Block
    titleButtonClicked 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;
    			
    		}