I am using I have a master-Detail page where the master displays an account record.
the detail displays all transactions related to that specific account.
The particular transactions are subject to approval by users with authority to approve each transaction.
I have image buttons that default to visible = false in the detail row.
The image button links to a page that allows the logged in user to approve the transaction.
i need to make the imagebutton visible=true based on a function that checks the logged in users
record to check if the logged in user has permission to approve a transaction.
I need a function that grabs the logged-in user id and gets the users record from a table that has the
user information that determines if the logged in user has permissions to approve the transaction.
If so then I need to make that imagebutton visible.on display.
I have the code that grabs the logged in userID from the session.
"Dim userID As String = Me.Page.SystemUtils.GetLoginId()"
I need the Logged -in userID and the organizationID to tell the function what record to retrieve.
The OrganizationID is passed to the master page through a querystring =?Organization
The table I have to get the user record from is titled" IndividualsinOrganizations"
FieldName Datatype Filter or conditional
IndividualID integer This should correspond with the UsrID =logged in userID
OrganizationID Integer This should correspond to the OrganizationID in the current Record.
Active bit =true
StartDate smallDatetime =< currentDate
EndDate SmallDatetime => currentDate
CheckApproval bit =True
I am told I can use a GetRecord(s) method to retrieve the record based on the logged in UserID and organizationID.
Once i retreive the record I can use the where clause to determine if the logged user has rights to approve the transaction therefore I can make the image button visible
It has also been suggested that I put this function in the DataBind method of the recordControlRow.
How can I write this code so it works?