1,622 questions

3,169 answers

1,696 comments

477 users

Equivalent of ContextID in BBIS

0 votes

I have a request to display the Use Code of the current designation on the designation details page in BBIS.

 

I have a part that will correctly display the use code of a designation, but I am having trouble detecting what the "current" designation is.

 

In BBEC, this would be the current context. What is the analagous concept in BBIS?

 

My code is below, with the relevant line in bold.

 

 

    Private Sub InitializeForm()
        'Instead of a hard-coded GUID, I want to say something like Me.CurrentContextID.
        'What's the magic word for that in BBIS?
        Dim useCode As String = UseCodeFromDesignationID(New Guid("95A150D2-B714-4BE7-8199-D3FFB6CCB9FE"))
 
        If 0 < useCode.Length Then
            lblDesigUseCode.Text = CONST_CAPTION + useCode
        Else
            lblDesigUseCode.Text = ""
        End If
    End Sub
 
    Private Function UseCodeFromDesignationID(ByVal designationID As Guid) As String
        Dim recordID As String = designationID.ToString()
        Try
            'URL needs to be pointed at the "service hosting the current site", ditto for database
            Dim svc As New AppFxWebServiceProvider(Me.API.Settings.AppFxUrl, Me.API.Settings.AppFxDatabase)
 
            'Return the designation use code
            Dim result As String = ViewForms.Designation.DesignationUseCodeDisplay.LoadData(svc, recordID).USE_CODE.Trim()
            If result IsNot Nothing Then
                If (0 = result.Length) Or ("None" = result) Then
                    Return "No designation use code was found"
                Else
                    Return result
                End If
            Else
                Return ""
            End If
 
        Catch ex As Exception
            Return "Error retrieving recognition for recordID " + recordID + " (" + ex.Message + ")"
        End Try
    End Function
asked Jun 9, 2011 by josephstyons (1,748 points)   6 33 61

1 Answer

0 votes
 
Best answer

Use querystrings...poor guy...

answered Jun 14 by chriswhisenhunt (3,763 points)   8 23 42
selected Jun 14 by josephstyons
...