What I am doing is configuring a sales order line custom field, as a lookup type.
It's purpose is to associate this line with another inventory item.
In the BottonClicked code block, I've got
- Code: Select all
public void ButtonClicked(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
{
if (CustomField.PluginCustomField.Name == "Item1")
{
string id = null;
using (JiwaFinancials.Jiwa.JiwaApplication.JiwaSearchAsync.SearchForm searchDialog = JiwaFinancials.Jiwa.JiwaApplication.JiwaSearchAsync.Factory.CreateSearchForm(BusinessLogicHost.Manager, FormObject.Form, FormObject.GetType().ToString(), "Inventory Item"))
{
if (searchDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
id = searchDialog.Results[0];
JiwaFinancials.Jiwa.JiwaApplication.Entities.Inventory.Inventory inventory = BusinessLogicHost.Manager.EntityFactory.CreateEntity<JiwaFinancials.Jiwa.JiwaApplication.Entities.Inventory.Inventory>();
inventory.ReadRecord(id);
CustomFieldValue.Contents = inventory.PartNo;
CustomFieldValue.DisplayContents = inventory.PartNo;
}
}
}
}
All works well, the PartNo is saved to the database. But when I select my partNo the grid doesn't show my value until I save, i.e. the sales order is re-read.
I have
- Code: Select all
CustomFieldValue.DisplayContents = inventory.PartNo;
but wonder if there's another line I need to add for Jiwa 8 to get the PartNo to display on the lines grid?