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

Discussions relating to plugin development, and the Jiwa API.

Drill Down (Hyper link) from Custom Field

Postby SBarnes » Mon Oct 16, 2017 1:08 pm

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?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Drill Down (Hyper link) from Custom Field

Postby SBarnes » Tue Oct 17, 2017 4:10 pm

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");

      }
    }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

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

Postby Mike.Sheen » Fri Nov 10, 2017 10:43 am

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);
   }
}
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 21 guests

cron