Monday, 19 September 2011

Launching Dashboards or Report Layouts with Parameters

Method: Pass the parameters in the URL.

Step 1: Parameter Object
The parameter object attached to the Dashboard or Report Layout must be able to interpret the URL. This can be done in the AfterAdd handler method.

Example:

Protected Overrides Sub AfterAdd()
Dim strMatterIndex As System.String

' call stock object after add code
MyBase.AfterAdd()

' get matter number from url
strMatterIndex = System.Web.HttpContext.Current.Request.Item("MatterIndex")

' if there is a matter index
If Not String.IsNullOrEmpty(strMatterIndex)

' set matter index parameter
Me.Matter.Value = CInt(strMatterIndex)

' auto submit parameters
CType(Me, IParamObject).IsAutoSubmitParamObject = True
Else
' don't auto submit parameters
CType(Me, IParamObject).IsAutoSubmitParamObject = False
End If
End Sub


Step 2: Launching Object
Create a URL Action on the launching Object and implement the Execute function.
Return the URL for the Dashboard or Report Layout with the required parameters appended.

Example:

Protected Overrides Function Execute() As System.String
If Me.Owner.Matter.IsNull Then
Return Nothing
Else
Return String.Format("{0}&SID={1}&MatterIndex={2}", _
Me.UrlMgr.GetDashboardUrl("IM_ENQUIRY_MATTER"), _
Me.UserMgr.SessionID, Me.Owner.Matter.Value)
End If
End Function


Step 3: Action
Add the URL Action to a UI element.

Friday, 16 September 2011

Circular Dependency

Circular dependency in objects is not checked for on the save or build of individual files.

However, errors can arise when trying to:

  • Using 'Build Project' from the context menu of a project in IDE.
  • Using 'Update 3E - Extract' in the Upgrades section of Utilities 3E.

If both of these processes fail, chances are that a circular dependency exists in at least one of the project's objects.

To find the culprit, build each object individually with a Build Type of 'All AppObjects that use <Obj_Name> (Runtime Only)'. A circular dependency exception will show in the build output of the problem object.

Wednesday, 14 September 2011

UK/EMEA User Group 2011

UK/EMEA User Group 2011

Holborn Bars
138-142 Holborn
London
EC1N 2NQ

15 September 2011 09:30 – 22:00

Friday, 2 September 2011

DataObject Construction

To instantiate a new DataObject use the following:

Dim newTestObject As New TestObject(Me.ProcessAppMgr, CType(NextGen.Framework.Managers.AssemblyMgr.NxAssemblyMgr.GetObjectSchema("TestObject"), Schema.ISchema))

This is the way to create new data objects on the fly without having to load them from archetypes.