I am trying to create some iParts to replace some old xTender applets.
I am very familiar with creating web parts and have created a number of iParts successfully. What I am not able to find is any information on what values, variables and parameters are available to me inside those iParts. i.e. How do I retrieve the selected user ID?
Is this documentated someplace?
This would be for both web and desktop views.
Thanks
J
Selected User ID in the web
Hi J,
I don't think there is any documentation as to what is available to you inside of iParts. Perhaps looking at ETP examples will help get you what you need or using .NET reflector to see what you can access using the Asi dlls.
I'm not sure how you would retrieve information for iParts running in the desktop. Maybe someone with more OMNIS experience can help you there.
But I can tell you how to get the selected user ID in the web view. After referencing the Secure.dll in your iPart project this will check the 3 most common methods used to store the selected iMIS ID:
// First look for the ID in the URL, then check the cookie for impersonation or lastly use teh logged in user's id
if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
partyId = Request.QueryString["ID"];
else if (Request.Cookies["UserID"] != null && !Request.Cookies["UserID"].Value.Equals(string.Empty))
partyID = new Secure().Decrypt(Request.Cookies["UserID"].Value);
else if (AppPrincipal.CurrentIdentity.IsAuthenticated && AppPrincipal.CurrentIdentity.ContactMaster.Length > 0)
partyId = AppPrincipal.CurrentIdentity.ContactMaster;
After you have the ID, you should be able to access almost everything you need via Soa or iBO.
Good luck,
Courtney Robertson