New in distributed object model

Hi everyone,
I'm rather new in RMI and distributed software in general, and have a question perhaps seems very clear for everyone, but I don't find clearly explained.
When tutorials talk about invoking a remote method, do they mean the RMI client gets a remote method from a remote class and runs itself, or do they mean the RMI client only gets the return from a remote method execution in the server side ?
I think so, but before following reading, I'd like to be sure.
Thanks in advance. Ignasi Villagrasa.

What they mean is that a client program finds - somehow - an object that is actually instantiated on a server, and calls a method of that object, resulting in the method being executed on the server.

Similar Messages

  • Client Object Model in Visual Webpart

    Hi
    I am new to Client Object Model.I've to create a visual web part in SharePoint 2013 via Client Object Model using
    SandBoxed solution.
    i did following.
    1-Created empty sharepoint project
    2-added two dlls for Client Object Model in the project
    Microsoft.SharePoint.Client
    Microsoft.SharePoint.Client.Runtime
    3-in the visual webpart .ascx file i just created asp label as  below
    <asp:Label ID="label1" runat="server"></asp:Label>
    4- in the visual webpart .cs file i write a client object model code to show title items in the label from the "Test" list as below.
    5-when i deploy the code it deploys successfully,but when i try to insert this web-part on to the page it shows errors
    as below.
    Please tell me what am i doing wrong.Urgent help required.

    Yes,deployed as sandbox solution.Actually i want to create a visual webpart in Sharepoint 2013 using Client Object Model. How can i do this,i followed below steps.
    1-Created empty sharepoint project
    2-added two dlls for Client Object Model in the project
    Microsoft.SharePoint.Client
    Microsoft.SharePoint.Client.Runtime
    3-in the visual webpart .ascx file i just created asp label as  below
    <asp:Label ID="label1" runat="server"></asp:Label>
    4- in the visual webpart .cs file i write a client object model code to show title items in the label from the "Test" list as below.
    using Microsoft.SharePoint.Client;
    using System;
    using System.ComponentModel;
    using System.Web.UI.WebControls.WebParts;
    namespace SharePointProject2.VisualWebPart1
        [ToolboxItemAttribute(false)]
        public partial class VisualWebPart1 : WebPart
            // Uncomment the following SecurityPermission attribute only when doing Performance Profiling on a farm solution
            // using the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
            // for production. Because the SecurityPermission attribute bypasses the security check for callers of
            // your constructor, it's not recommended for production purposes.
            // [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
            public VisualWebPart1()
            protected override void OnInit(EventArgs e)
                base.OnInit(e);
                InitializeControl();
            protected void Page_Load(object sender, EventArgs e)
                ClientContext context = new ClientContext("http://spsiteURL");
                List testList = context.Web.Lists.GetByTitle("Test");
                CamlQuery query = CamlQuery.CreateAllItemsQuery(100);
                ListItemCollection items = testList.GetItems(query);
                context.Load(items);
                context.ExecuteQuery();
                foreach (ListItem listItem in items)
                    label1.Text = label1.Text + ", " + listItem["Title"];
    If this is not the correct way then how can i  use client object model to get sharepoint list items.Please mention.

  • Error while creating Logical Data Object Model

    Can anyone from Informatica help me on this ?

    Hello Everyone ,  I am creating new objects in Informatica BDE 9.6.1 . While  I trying to create a new Logical Data Object Model using the Customer_Order.xsd file  I am getting the error :  [MBCM_E0031 ]MIMB HOME directory is not valid .  I do not see anything in the drop-down list for Model Type .Kindly help .  RegardsSatyendra

  • Issue in adding new items to a O365 SharePoint Online List having lookup columns (Client Object Model)

    I have two Lists i.e. Publisher and Products in my SharePoint Online site. They are having the following structures:
    1. Publisher:
    Publisher (Single line of txt)
         A1
         A2
         A3
         A4
         A5
         A6
    2. Products:
    Publisher (lookup to the above column)       
    ProductName (Single line of txt)
         A1                                                                   Apple
         A2                                                                   Samsung
         A3                                                                   Nokia
    And I have an excel file named Products.xlsx in my local machine which has the following data:
    Publisher        ProductName
         A1                   Apple
         A2                   Samsung
         A3                   Nokia
         A4                   Motorola
         A5                   LG
         A6                   HTC
    Now I have written the below client-side (CSOM) code to fetch the data from the Excel and update the corresponding fields in the Products table:
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Web;
    using System.IO;
    using System.Data;
    using System.Data.OleDb;
    using System.Data.SqlClient;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Client;
    using File =
    Microsoft.SharePoint.Client.File;
    using System.Security;
    namespace ExcelToSP
        public class
    ExcelToSP
            //Main function to get the command line values and invoke the getSPList function to pull SP List data
            public
    static void Main(string[] args)
                //Instantiate Class object
                ExcelToSP p
    = new ExcelToSP();
                try
                    p.LoadExcelData();
    //Exit with Sucess code
    Environment.Exit(0);
                catch
    (Exception ex)
    //Invoke writeErrorLog function to log the exception details
    //p.WriteErrorLog(ex);
            public
    void LoadExcelData()
                try
                string fileName
    = @"E:\Products.xlsx";
                string fileExtension
    = Path.GetExtension(fileName).ToUpper();
                string connectionString
    = "";
                 if
    (fileExtension == ".XLS")
                    connectionString
    = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='"
    + fileName + "'; Extended Properties='Excel 8.0;HDR=YES;'";
                else
    if (fileExtension ==
    ".XLSX")
                    connectionString
    = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='"
    + fileName + "';Extended Properties='Excel 12.0 Xml;HDR=YES;'";
                if
    (!(string.IsNullOrEmpty(connectionString)))
    string[] sheetNames =
    GetExcelSheetNames(connectionString);
    if ((sheetNames !=
    null) &&
    (sheetNames.Length
    > 0))
    DataTable dt = null;
    OleDbConnection con =
    new OleDbConnection(connectionString);
    OleDbDataAdapter da =
    new OleDbDataAdapter("SELECT * FROM ["
    + sheetNames[0]
    + "]", con);
                        dt
    = new DataTable();
                        da.Fill(dt);
    InsertIntoList(dt,"Products");
                catch
    (Exception ex)
    throw ex;
            private
    string[] GetExcelSheetNames(string strConnection)
                var connectionString
    = strConnection;
                String[] excelSheets;
                using
    (var connection =
    new OleDbConnection(connectionString))
                    connection.Open();
    var dt = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
    null);
    if (dt ==
    null)
    return null;
                    excelSheets
    = new String[dt.Rows.Count];
    int i = 0;
    // Add the sheet name to the string array.
    foreach (DataRow row
    in dt.Rows)
                        excelSheets[i]
    = row["TABLE_NAME"].ToString();
                        i++;
                return excelSheets;
            private
    void InsertIntoList(DataTable listTable,
    string ListName)
                try
    string username = "[email protected]";
    string pwd = "contoso@1234";//this.Dts.Variables["password"].Value.ToString();
    ClientContext clientContext =
    new ClientContext("https://contoso.sharepoint.com/teams/myPOC/");
    SecureString password =
    new SecureString();
    char[] decryptpwd = pwd.ToCharArray();
    foreach (char c
    in decryptpwd)
                        password.AppendChar(c);
                    clientContext.Credentials
    = new SharePointOnlineCredentials(username, password);
                    clientContext.ExecuteQuery();
    //Setting SiteURL Client context
    Web web = clientContext.Web;//
                    clientContext.Load(web);
                    clientContext.ExecuteQuery();
    List lstProductFamily = web.Lists.GetByTitle("Products");
    for (int iRow
    = 0; iRow < listTable.Rows.Count; iRow++)
    ListItemCreationInformation itemCreateInfo =
    new ListItemCreationInformation();
    ListItem newItem = lstProductFamily.AddItem(itemCreateInfo);
    //FieldLookupValue flv = newItem["Publisher"] as FieldLookupValue ;
    //string lkup = flv.LookupValue;
    //int valueid = 0;
    //valueid = flv.LookupId;
                        newItem["Publisher"]
    = Convert.ToString(listTable.Rows[iRow][0]);
                        newItem["ProductName"]
    = Convert.ToString(listTable.Rows[iRow][1]);
                        newItem.Update();
                        clientContext.ExecuteQuery();
                catch
    (Exception ex)
    throw ex;
    But I'm getting the following error on running the above code "Invalid data has been used to update the list item. The field you are trying to update may be read only." 
    Can anybody please help me out?

    Hi,
    According to your description, my understanding is that you want to update data to look up field.
    I have a test about updating look up field using Client Object Model in my environment. lookup field will accept an array to set the field value.
    Here is the code snippet:
    Microsoft.SharePoint.Client.ClientContext ctx = new ClientContext("http://sp2013sps/sites/test/");
    if (ctx != null)
    List list = ctx.Web.Lists.GetByTitle("List3");
    ListItem itemToUpdate = list.GetItemById(1);
    ctx.Load(itemToUpdate);
    ctx.ExecuteQuery();
    FieldLookupValue newLookUpField = new FieldLookupValue();
    newLookUpField.LookupId = 3;
    FieldLookupValue newLookUpField1 = new FieldLookupValue();
    newLookUpField1.LookupId = 4;
    FieldLookupValue[] newarr = { newLookUpField, newLookUpField1 };
    itemToUpdate["lookup"] = newarr;
    itemToUpdate.Update();
    ctx.Load(itemToUpdate);
    ctx.ExecuteQuery();
    Best regards
    Patrick Liang
    TechNet Community Support

  • How do I create a context menu in the new ALV object model (cl_salv_table)?

    Hi,
    Does anyone know how to create a context menu (right click on line or field) in the new ALV object model (class CL_SALV_TABLE)?
    Thanks in advance
    Keld Gregersen
    PS: In the past we could use event CONTEXT_MENU_REQUEST in class CL_GUI_ALV_GRID, so it must be possible

    I don't think there's "any such animal" in the new class. I'm not 100% certain however but the new class is only useful for fairly simple display only type grids.
    There's no edit capability either.
    I'd stick with cl_gui_alv_grid until there's some decent extra functionality in the cl_salv_table class.
    It's fine for quick "bog standard" displays as it doesn't need a field catalog or any screens to be created by the user or developer  - but you pay a price for that in limited fnctionality.
    Cheers
    jimbo

  • Copy one list items new list using client side object model

    Hi,
    I have a requirement like i need to copy one list information to new list with createdby and modified by fields.I need to use client side object model code.Can u please send me the code sample.
    Regards,
    Praveen

    Hi,
    According to your post, my understanding is that you want to copy one list items new list using client side object model.
    You can use console application.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/28a43891-7505-4d34-b513-fdd66773c2a3/copy-list-item-to-another-list-using-client-object-model-in-console-application?forum=sharepointdevelopmentprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

    I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The code that I am using is:
    using (System.IO.Stream fileStream = System.IO.File.OpenRead(m_strFilePath))
        Microsoft.SharePoint.Client.File.SaveBinaryDirect(m_clientContext, str_URLOfFile, fileStream, true);
        Microsoft.SharePoint.Client.File fileUploaded = m_List.RootFolder.Files.GetByUrl(str_URLOfFile);
        m_clientContext.Load(fileUploaded);
        m_clientContext.ExecuteQuery();
        User user1 = m_Web.EnsureUser("User1");
        User user2 = m_Web.EnsureUser("User2");
        ListItem item = fileUploaded.ListItemAllFields;
        fileUploaded.CheckOut();
        item["UserDefinedColumn"] = "UserDefinedValue1";
        item["Title"] = "UserDefinedValue2";
        item["Editor"] = user1;
        item["Author"] = user2;
        item.Update();
        fileUploaded.CheckIn(string.Empty, CheckinType.OverwriteCheckIn);
        m_clientContext.ExecuteQuery();

    Hi talib2608,
    Chris is correct for this issue, when calling update using ListItem.update method, it will increase item versions, using SystemUpdate and UpdateOverwriteVersion will update the list item overwrite version.
    these two methods are not available in CSOM/REST, only server object model is available for this.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Create a site collection with dedicated content db with the help of server object model

    Hi,
     I have a requirement to implement a create a new site collection with dedicated content db. i have got 2 PowerShell scripts which does the same. first i will  create a content  db and then create the sitecollection with contentdb
    parameter with the created contentdb name.
    Now the site collection created must contain few doc libs and few splists with look up columns, people picker data type, multiline of text, single line of text,choice field. hence i am thinking the below approach:
     1) create a web template and include sp doclibs, splists , site columns in this.
     2) i am thinking of a ui design to create the below:
     These are called "projects" which is actually the site collection with the doclibs, splists and must be created by sharepoint admin on click of a link in my landing page.end users access these "projects"  aka 
    "site collections" and uploads the documents into these projects and collaborate.
    so my question is :  On click of a button can I create a site collection with a dedicated content db based on the web template created with the  hel of  server  object model?
    The other approach is on click of this button call the power shell script which accepts the sitecollection name and contentdb name as parameter. is this possible in  server obj.model ?
    passing a paramter from code behind- visual web part ui to power shell ?
    and it should create the site collec based on the web template and create the content db.
    my doubt #3 : will it not throw error "request timed out" when creating the site collec and contentdb from ui ?

    Try below:
    http://sharepoint.stackexchange.com/questions/21606/programmatically-create-a-site-collection-in-an-existing-mounted-content-databa
    PowerShell is just a wrapper for the object model. You shouldn't need to reference PowerShell in your feature, just create the new site collection with C# inside your feature. There's a blog post here that illustrates some code that may get you started.
    http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/
    http://blogs.msdn.com/b/vesku/archive/2014/06/09/provisioning-site-collections-using-sp-app-model-in-on-premises-with-just-csom.aspx
    # Enable the remote site collection creation for on-prem in web application level
    # If this is not done, unknon object exception is raised by the CSOM code
    $WebApplicationUrl = http://dev.contoso.com
    $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null)
    Write-Host "Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
    $webapp=Get-SPWebApplication $WebApplicationUrl
    $newProxyLibrary = New-Object "Microsoft.SharePoint.Administration.SPClientCallableProxyLibrary"
    $newProxyLibrary.AssemblyName = "Microsoft.Online.SharePoint.Dedicated.TenantAdmin.ServerStub, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
    $newProxyLibrary.SupportAppAuthentication = $true
    $webapp.ClientCallableSettings.ProxyLibraries.Add($newProxyLibrary)
    $webapp.Update()
    Write-Host "Successfully added TenantAdmin ServerStub to ClientCallableProxyLibrary."
    # Reset the memory of the web application
    Write-Host "IISReset..."
    Restart-Service W3SVC,WAS -force
    Write-Host "IISReset complete."
    If this helped you resolve your issue, please mark it Answered

  • How to get the values of managed metadata columnn through object model

    Hi,
    I need to read the values from a managed metadata column, which is set to display entire path.
    Eg. My value looks like
    Critical:Important:Interesting:Routine:Not Evaluated
    without hardcoding these values, can i find which level of child has been chosen.
    if its not evaluated, i should find like last child like that..
    any way of doing that?
    Aruna

    Hi,
    thanks for the above reply.
    i got a new requirement as,  following is my managed metadata structure user selects the values from the below structure. i need to find the matching items with another list of same structure. the condition for matching is, if the user selects All,
    in the otehr list if the value in the region column equals any of the values in the structure below All like ema, denmark,nordborg is considered to be matched. if the user selects Denmark then the list contains denmark, nordborg and office is matched. means
    parent and its child contents are matched if the parent is chose. if the child is chosen only the exact value from other list(office==office in otehr list) is considered to be matched. how can i achieve it through object model coding?
    Aruna

  • ReportClientDocument object model, simple question

    How can I modify report in runtime using RAS SDK (ReportClientDocument obj model)?
    I tried several different ways to modify report (change date format of the field, change field width...), and nothing happens.
    all properties seems to be changed but, reportdocument object remains unchanged.
    here is the code I used:
                   object path = (object)@"C:\Program Files\Business Objects\BusinessObjects Enterprise 11\Samples\EN\Reports\cr_ListOfLateFeesToBeExempted.rpt";
                   ReportClientDocument crReportDocument = new ReportClientDocument();
                   crReportDocument.ReportAppServer = "sizlak";
                   crReportDocument.Open(ref path, 0);
                   CrystalDecisions.Shared.ConnectionInfo crConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();
                   crConnectionInfo.ServerName = "***";
                   crConnectionInfo.DatabaseName = "****";
                   crConnectionInfo.UserID = "***";
                   crConnectionInfo.Password = "***";
                   TableLogOnInfos crTableLogonInfos = new TableLogOnInfos();
                   crViewer.LogOnInfo = crTableLogonInfos;
                   CrystalDecisions.ReportAppServer.ReportDefModel.ReportObjects sss = crReportDocument.ReportDefController.ReportObjectController.GetAllReportObjects();
                   foreach(CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject ss in sss)
                        Response.Write("<br>" + ss.Kind);
                        if(ss.Kind == CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindField)
                             CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject myField = crReportDocument.ReportDefinition.FindObjectByName(ss.Name) as CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject;
                             if(myField.FieldValueType == CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeDateField ||
                                  myField.FieldValueType == CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeDateTimeField)
                                  myField.Height=150;
                                  myField.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentRight;
                                  myField.FontColor.Color = 32000;
                                  myField.Border.RightLineStyle = CrystalDecisions.ReportAppServer.ReportDefModel.CrLineStyleEnum.crLineStyleDouble;
                                  myField.Width = 2;
                                  myField.Border.HasDropShadow = true;
                   crViewer.ReportSource = crReportDocument;

    hi, i am using jbuilder 2006 for my j2ee project.
    i want to see the object model diagram which shows me
    the whole existing project in one place stating how
    objects are related. so ---
    1. how can i do that in jbuilder?RTFM. If it's supported in the version of JBuilder you use (I think it's only supported in the enterprise edition) it will be mentioned in the manual.
    2. are there any other good tools/softwares
    available?yes.
    3. any pointers for preparing this diagram is
    appreciated.
    Sun's course number OO-226

  • Getting 'File not found' error while using server object model code

    Hi,
    I am using server object model code to pull list data in a console application. My machine has standalone installation of SP 2010. I am getting error 'File Not Found', however the same operation is working fine with client object model code.
    Code I am using:
    string strURL=http://servername/sites/sitename;
    SPSite siteObj=new SPSite (strURL); //getting error here.
    I have already checked the below,
    1. Framework being used is 3.5.
    2. I have proper access to site.
    3. Running visual studio as admin.
    Any help is much appreciated.
    thanks
    Tarique
    thanks and regards Tarique Aslam

    Hello Tarique ,
    Couple of pints need to check:
    1. User running the console application needs to have at least read permission to the SharePoint databases
    2. Set application by changing the "Platform target:" option on the "Build" to "Any CPU"
    Also refer this similar thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2a419663-c6bc-4f6f-841b-75aeb9dd053d/spsite-file-not-found
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How can I get an item and it's attachments from the current list using SP's JavaScript Client Object Model on newform.aspx?

    I only recently learned/read about SharePoint's JavaScript Client Object Model. I'm reading online trying to figure this out but not having much luck.
    On newform.aspx (and dispform.aspx) I want to get the
    current list,
    the last item created, and it's attachments. I now the CAML query I need to get the last item created, but first I have to get the current list and I am not sure how to do that.
    I tried this but it returns null:
    SP.ListOperation.Selection.getSelectedList()

    Hi,
    For your issue, you can get the list name from the new form url and retrieve the list last created item :
    https://social.msdn.microsoft.com/Forums/office/en-US/b90a64f8-2255-41b0-9d91-78335dd4a4cf/get-list-name-from-list-url-through-javascript?forum=sharepointdevelopmentprevious
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Unable to get the SharePoint 2013 List names using Client object model for the input URL

    Please can you help with this issue.
    We are not able to get the SharePoint 2013 List names using Client object model for the input URL.
    What we need is to use default credentials to authenticate user to get only those list which he has access to.
    clientContext.Credentials = Net.CredentialCache.DefaultCredentials
    But in this case we are getting error saying ‘The remote server returned an error: (401) Unauthorized.’
    Instead of passing Default Credentials, if we pass the User credentials using:
    clientContext.Credentials = New Net.NetworkCredential("Administrator", "password", "contoso")
    It authenticates the user and works fine. Since we are developing a web part, it would not be possible to pass the user credentials. Also, the sample source code works perfectly fine on the SharePoint 2010 environment. We need to get the same functionality
    working for SharePoint 2013.
    We are also facing the same issue while authenticating PSI(Project Server Interface) Web services for Project Server 2013.
    Can you please let us know how we can overcome the above issue? Please let us know if you need any further information from our end on the same.
    Sample code is here: http://www.projectsolution.com/Data/Support/MS/SharePointTestApplication.zip
    Regards, PJ Mistry (Email: [email protected] | Web: http://www.projectsolution.co.uk | Blog: EPMGuy.com)

    Hi Mistry,
    I sure that CSOM will authenticate without passing the
    "clientContext.Credentials = Net.CredentialCache.DefaultCredentials" by default. It will take the current login user credentials by default. For more details about the CSOM operations refer the below link.
    http://msdn.microsoft.com/en-us/library/office/fp179912.aspx
    -- Vadivelu B Life with SharePoint

  • How to get list of users who all are having full access in sharepoint site using client object model c#

    Hi,
    I want to fetch the list of users who all are having full access to the sharepoint list using client object model with .Net
    Please let me know if any property for the user object or any other way to get it.
    Thanks in advance.

    Here you are complete code i created from some years it lists all groups and users, you can just add a check in the permissions loop to see if it is equal to Full Control.
    Private void GetData(object obj)
    MyArgs args = obj as MyArgs;
    try
    if (args == null)
    return; // called without parameters or invalid type
    using (ClientContext clientContext = new ClientContext(args.URL))
    // clientContext.AuthenticationMode = ClientAuthenticationMode.;
    NetworkCredential credentials = new NetworkCredential(args.UserName, args.Password, args.Domain);
    clientContext.Credentials = credentials;
    RoleAssignmentCollection roles = clientContext.Web.RoleAssignments;
    ListViewItem lvi;
    ListViewItem.ListViewSubItem lvsi;
    ListViewItem lvigroup;
    ListViewItem.ListViewSubItem lvsigroup;
    clientContext.Load(roles);
    clientContext.ExecuteQuery();
    foreach (RoleAssignment orole in roles)
    clientContext.Load(orole.Member);
    clientContext.ExecuteQuery();
    //name
    //MessageBox.Show(orole.Member.LoginName);
    lvi = new ListViewItem();
    lvi.Text = orole.Member.LoginName;
    lvsi = new ListViewItem.ListViewSubItem();
    lvsi.Text = orole.Member.PrincipalType.ToString();
    lvi.SubItems.Add(lvsi);
    //get the type group or user
    // MessageBox.Show(orole.Member.PrincipalType.ToString());
    if (orole.Member.PrincipalType.ToString() == "SharePointGroup")
    lvigroup = new ListViewItem();
    lvigroup.Text = orole.Member.LoginName;
    // args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    Group group = clientContext.Web.SiteGroups.GetById(orole.Member.Id);
    UserCollection collUser = group.Users;
    clientContext.Load(collUser);
    clientContext.ExecuteQuery();
    foreach (User oUser in collUser)
    lvigroup = new ListViewItem();
    lvigroup.Text = "";
    lvsigroup = new ListViewItem.ListViewSubItem();
    lvsigroup.Text = oUser.LoginName;
    lvigroup.SubItems.Add(lvsigroup);
    //args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    // MessageBox.Show(oUser.LoginName);
    RoleDefinitionBindingCollection roleDefsbindings = null;
    roleDefsbindings = orole.RoleDefinitionBindings;
    clientContext.Load(roleDefsbindings);
    clientContext.ExecuteQuery();
    //permission level
    lvsi = new ListViewItem.ListViewSubItem();
    string permissionsstr = string.Empty;
    for (int i = 0; i < roleDefsbindings.Count; i++)
    if (i == roleDefsbindings.Count - 1)
    permissionsstr = permissionsstr += roleDefsbindings[i].Name;
    else
    permissionsstr = permissionsstr += roleDefsbindings[i].Name + ", ";
    lvsi.Text = permissionsstr;
    lvi.SubItems.Add(lvsi);
    // args.PermissionsList.Items.Add(lvi);
    DoUpdate2(lvi);
    catch (Exception ex)
    MessageBox.Show(ex.Message);
    finally
    DoUpdate3();
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • Creating custom BOL object model for adding Search Parameter

    Hi friends
    Can any one guide me the steps through which i can add the new field in the search criteria by using the creation of custom BOL object model in Interaction Center Web Client.
    That will be a grate help for me.
    Regards
    Pulkit
    Message was edited by:
            Pulkit Agrawal

    Hi!
    For maintaining CRMC_OBJECTS table you should use view CRMV_OBJECTS. (in transaction SM30).
    Regards,
    Alejandro.

Maybe you are looking for

  • How do I send email with a different "From:" address?

    Hi, I have an email account that forwards to my mac.com account, and on my iPhone I have it set up to sync mail with that MobileMe account. Push is working fine and I can send and receive email. What I'd like to do, though, is set it so by default my

  • IPhone Calendar sync broken

    Since a few weeks I only see one iCloud calendar on my iPhone. I checked: all my devices use the same [email protected] address, and in iCloud.com I can see all my calendars. However on my iPhone 4 running iOS 7.1 I only see one calendar from iCloud. I tri

  • Why do i only see Asian characters when i attempt to first sync my ipad?

    when i first try to sync my ipad 2 it gives me Asian characters.  how do I change it to English.

  • No start profiles found

    Hi, I'm getting this error while starting instance on application server.On application server we have 2 instances but getting this error only while starting 1 instance. usage: grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [-e pattern_list...]         -f patte

  • Opinions?  Do you let 2003s camp out in spacious 2007s?

    Hi Everyone, Just out of curiosity, am I the only one late to the game in discovering that the definition of sdo_gtype 2007 allows single polygons, what I would call a "2003" to validly live inside a geometry defined as sdo_gtype 2007? When you see a