Page 1 of 1

Drill Down (Hyper link) from Custom Field

PostPosted: Mon Oct 16, 2017 1:08 pm
by SBarnes
Hi Guys,

Is it possible to create a hyper link / drill down for a custom value to SO History?

I know you can do it for a column in Jiwa's Grid but can you do it for a specific row?

Re: Drill Down (Hyper link) from Custom Field

PostPosted: Tue Oct 17, 2017 4:10 pm
by SBarnes
I have tried the following code, trying either line to launch the custom delivery screen or the purchase orders screen from the sales order snapshot custom settings doesn't want to work with the field locked or unlocked in Jiwa 7.0.157.

Code: Select all
    public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldValues HostObject, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
      if ( CustomField.PluginCustomField.Name == "DeliveryRun")
      {

      
            GridObject.ActiveSheet.Cells[Row, Col].Locked = true;
             //GridObject.SetDrillDown("Contents", Row, "JiwaDeliveries.Deliveries", "04c7be52-0ffb-4d05-9010-3fc9f65666fe");
             GridObject.SetDrillDown("Contents", Row, "JiwaFinancials.Jiwa.JiwaPurchaseOrdersUI.PurchaseOrders", "0007440878114636A3D2");

      }
    }

Re: Drill Down (Hyper link) from Custom Field  Topic is solved

PostPosted: Fri Nov 10, 2017 10:43 am
by Mike.Sheen
Wow, we really need to clean some things in that grid control.

It's not real intuitive, but this is what I had to do in order get drill downs (and the hand cursor) working on the custom fields grid:

Code: Select all
public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldValues HostObject, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
{
   if (CustomField.PluginCustomField.Name == "PO")
   {
      // Set cell type         
      GridObject.ActiveSheet.Cells[Row, Col].CellType = new JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType();
      
      // Set drilldown for hand cursor to be shown
      if (GridObject.ActiveSheet.Cells[Row, Col].Tag == null)
         GridObject.ActiveSheet.Cells[Row, Col].Tag = "DrillDown=1;";
      else            
         GridObject.ActiveSheet.Cells[Row, Col].Tag = GridObject.StoreProperty(GridObject.ActiveSheet.Cells[Row, Col].Tag.ToString(), "DrillDown", "1");
      
      // Set drilldown
      GridObject.SetDrillDown("Contents", Row, "JiwaFinancials.Jiwa.JiwaPurchaseOrdersUI.PurchaseOrders", CustomFieldValue.Contents);
   }
}