Csom error The property or field 'LoginName' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

Hi sir,
When I have get the value of project owner the error is occured
The property or field 'LoginName' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
vijay

Hi Vijay,
The owner details are not loaded by default when you load all projects.
You have to make sure the details of the project owner are loaded before you can access them:
foreach (PublishedProject pubProj in projContext.Projects){
User owner = pubProj.Owner;
projContext.Load(owner);
projContext.ExecuteQuery();
Console.WriteLine(owner.LoginName);

Similar Messages

  • Error during project server 2013 The property or field 'StartDate' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

    Hi sir,
    when I have try to fetch the value of project start date and finish date and some other field value , I have recived error message like The property or field 'StartDate' has not been initialized. It has not been requested or the request has not been
    executed. It may need to be explicitly requested.
    I have used client context for project server 2013.
    I have also load and execute query.but fail to resolve it Please suggest me and provide solution.
    vijay

    Hi,    
    If you use the Include<TSource> Method in the Load method, we will retrieve only the ids of items in this query, so
    the listItems.ListItemCollectionPosition will not be initialized.
    You can use the <ViewFields> tag in CAML Query to specify the field values to return with each item instead.
    Best regards
    Patrick Liang
    TechNet Community Support

  • SCRIPT5022: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

    Hi,
    i have a simple javascript which throws me the following error:
    SCRIPT5022: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
    I am using it under O365 inside an Content Editor WebPart. I have a list called "myTestList" with several items and one column called "points". I want to retrieve only the items which
    i have created and sum the points to show it inside a div. This is my code.
    <div id="myPoints" style="font-size: 50px;">0​</div>
    <script language="javascript" type="text/javascript">
    SP.SOD.executeOrDelayUntilScriptLoaded(retrieveMyItems, "sp.js");
    function retrieveMyItems() {
    var clientContext = new SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('myTestList');
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Author' /><Value Type='Integer'><UserID /></Value></Eq></Where></Query></View>");
    this.collListItem = oList.getItems(camlQuery);
    clientContext.load(collListItem, 'Include(points)');
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onMyItemsQuerySucceeded), Function.createDelegate(this, this.onMyItemsQueryFailed));
    function onMyItemsQuerySucceeded(sender, args) {
    var listItemInfo = 0;
    var listItemEnumerator = collListItem.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    listItemInfo = listItemInfo + parseInt(oListItem.get_item('points'));
    var div = document.getElementById("myPoints");
    div.innerHTML = listItemInfo;
    function onMyItemsQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>​
    Whats wrong here?
    Best Regards
    Bog
    Developers Field Notes | www.bog1.de

    Solved!
    The set_viewXml line must be:
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Author' /><Value Type='Integer'><UserID Type='Integer'/></Value></Eq></Query></Where></View>");
    Best Regards
    Bog
    Developers Field Notes | www.bog1.de

  • The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested

    hi sir,
    I have try to update task assignments using csom model.
     erro message ::The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested
     foreach (PublishedAssignment assignItem in item.Assignments)
                                Guid id =assignItem.Id;
                               cc.Load(assignItem, a => a.Resource,a=>a.PercentWorkComplete);
                               cc.ExecuteQuery();
                               EnterpriseResource er = cc.EnterpriseResources.GetByGuid(assignItem.Resource.Id);
                               cc.Load(item.Assignments,c=>c.Where(uu=>uu.Id==id).IncludeWithDefaultProperties( l=> l.Task.Assignments,l=>l.Work));
                               cc.ExecuteQuery();
                               er.Assignments.Single(ll => ll.Id == id).Work = "9";
                               cc.Load(er);
                               cc.ExecuteQuery();
                               StatusAssignmentCollection sac = er.Assignments;
                               sac.Update();
                               sac.SubmitAllStatusUpdates("hello vijay");
    vijay

    Hi Vijay,
    You didn't load the 'er.Assignments' collection.
    Make sure it's loaded and it should work
    Hope this helps

  • The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

    After installed February
    2015 CU for SharePoint 2013 appear error when click on 'Shared
    With' in list item.
    The screenshots see here: 1 and 2
    Is this a bug?

    Yes, this is a known bug introduced with the November 2014 CU. There is no solution as of yet.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • "The property or field has not been initialized" Error, when debbuging app

    Hello,
    I'm  following the instructions of a dev book but I get the following error message when debugging the app.
    "The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."
    The code:
    var collListItems;
    $(document).ready(function () {
    getConfigValues();
    function getConfigValues() {
    var context = SP.ClientContext.get_current();
    var configList = context.get_web().get_lists().getByTitle('Configuration Values');
    var camlQuery = new SP.CamlQuery();
    collListItems = configList.getItems(camlQuery);
    context.load(collListItems);
    context.executeQueryAsync(onGetConfigValuesSuccess, onGetConfigValuesFail);
    function onGetConfigValuesSuccess() {
    var OrgLogoUrl;
    var OrgName;
    var listItemEnumerator = collListItems.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var current = oListItem.get_item('Title');
    switch (current) {
    case 'OrganizationName':
    OrgName = oListItem.get_item('Value');
    break;
    case 'OrganizationLogoUrl':
    OrgLogoUrl = oListItem.get_item('Value');
    break;
    if (OrgName && OrgName.length > 0) {
    $('#DeltaPlaceHolderPageTitleInTitleArea').html(OrgName);
    $('.ms-siteicon-img').attr('title', OrgName);
    if (OrgLogoUrl && OrgLogoUrl.length > 0)
    $('.ms-siteicon-img').attr('src', OrgLogoUrl);
    else
    $('.ms-siteicon-img').attr('src', '../Images/AppLogo.png');
    function onGetConfigValuesFail(sender, args) {
    alert('Failed to get the Configuration Values. Error:' + args.get_message());
    What it have to do is to replace the Title and Site logo, using the "Title" and "Value" fields of the "Configuration Values" list.
    My dev environment: SharePoint online, Azure, VS2013 Ultimate (trial)
    I've tried to reach the author of the book but it's being 4 days and no response, maybe somebody here can help me.
    Thanks in advance.
    Jimmy

    Jaydeep, I don't get the values, see the HTML code below.
    <%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %>
    <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%-- The markup and script in the following Content element will be placed in the <head> of the page --%>
    <asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="/_layouts/15/sp.js"></script>
    <!-- Add your CSS styles to the following file -->
    <link rel="Stylesheet" type="text/css" href="../Content/App.css" />
    <!-- Add your JavaScript to the following file -->
    <script type="text/javascript" src="../Scripts/App.js"></script>
    </asp:Content>
    <%-- The markup in the following Content element will be placed in the TitleArea of the page --%>
    <asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    KA Online Klas
    </asp:Content>
    <%-- The markup and script in the following Content element will be placed in the <body> of the page --%>
    <asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <div id="menu">
    <ul>
    <li><a href="../Lists/Configuration Values">Site Configuration</a></li>
    <li><a href="../Lists/Site Assets">Site Assets</a></li>
    </ul>
    </div>
    </asp:Content>

  • How do I unhide the URL window/field that allows me to directly enter a different URL without using the Search Window/field?

    I need to unhide the window or field that allows me to DIRECTLY enter a different URL. I do not want to use the search engine. I want to manually enter the URL of my choice and go DIRECTLY there.
    So, how do I unhide the URL window?

    It is still there at the left most part part of the address bar, but you have to press and hold the trackpad to use it.
    Click the Share (arrow out of the box) button  to add  bookmark.

  • I continue to receive email alerts advising that my Apple ID was used to purchase an app. I changed my password but the alerts continue to come. Purchases are initiated from various different countries. My credit card has never been charged. How cano

    ALerts advising purchases were mde using my Apple IDcontinue to come to my email. I changed my password  but theycontinue to come.Hoes can I stop his.

    It is possible that these emails are phishing attempts. Do NOT click any link in the email. The phishers are very clever in that they seem to follow Apple Graphic Design Standards to near perfection. A sure way to tell is to examine any link the email contains for its target URL. If it does not point to the apple.com domain - NOT just contain the word "apple"in it 'somewhere - but point to the Apple web presence - it is most certainly phishing. If you determine that it is phishing, you can and should FORWARD the email to [email protected] > then DELETE with Prejudice. Also, see Phishing & Other Suspicious Emails > http://www.apple.com/legal/more-resources/phishing/ for more information ÇÇÇ

  • Adding custom webpart throwing Javascript error -The collection has not been initialized.

    Hi,
    I created a Javascript CSOM visual webpart and added to page. In the IE developer tools console, I am getting an error as below:
    "SCRIPT5022: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
    SP.Runtime.js, line 2 character 35853".
    My code is as below:
    <script type="text/javascript" src="../../_layouts/15/MicrosoftAjax.js"></script>
    <script type="text/javascript" src="../../_layouts/15/SP.Runtime.js"></script>
    <script type="text/javascript" src="../_layouts/15/sp.js"></script>
    <script type="text/javascript" src="../_layouts/15/sp.ui.controls.js"></script>
    <script type="text/javascript" src="/_layouts/15/test/Scripts/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="/_layouts/15/test/Scripts/Rotator.js"></script>
    <script type="text/javascript" src="/_layouts/15/test/Scripts/bjqs-1.3.js"></script>
    <link rel="stylesheet" type="text/css" href="/_layouts/15/test/CSS/bjqs.css" />
    <SharePoint:FormDigest ID="FormDigestRotator" runat="server">
    </SharePoint:FormDigest>
    <div id="banner-fade">
    <ul id="carousel" class="bjqs">
    </ul>
    </div>
    // In Rotator.js
    $(document).ready(function () {
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadConfigData);
    function loadConfigData() {
    var clientcontext = new SP.ClientContext.get_current();
    var oweb = clientcontext.get_site().get_rootWeb();
    var olist = oweb.get_lists().getByTitle("LibName");
    var configquery = SP.CamlQuery.createAllItemsQuery();
    Allpictures = olist.getItems(configquery);
    clientcontext.load(Allpictures, 'Include(Title,ImgSubURL)');
    clientcontext.executeQueryAsync(Function.createDelegate(this, this.Configsuccess), Function.createDelegate(this, this.Configfailed));
    How to fix this javascript error? Due to this, the "Check-in" option is not working.
    Update: i believe the error is with "executeQueryAsync". How to fix this?
    Thanks

    Hi,
    I suggest you create a simple demo first, once it works, then add other customization into your project gradually. It will be easier to composite the correct code.
    Please apply the code below in your project for a try:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("callCSOM");
    var clientContext;
    var website;
    var str="";
    // Make sure the SharePoint script file 'sp.js' is loaded before your
    // code runs.
    function callCSOM()
    //alert("call");
    $("#Button1").click(function()
    ExecuteOrDelayUntilScriptLoaded(sharePointReady, "sp.js");
    // Create an instance of the current context.
    function sharePointReady() {
    clientContext = SP.ClientContext.get_current();
    website = clientContext.get_web();
    clientContext.load(website);
    clientContext.executeQueryAsync(onRequestSucceeded, onRequestFailed);
    function onRequestSucceeded() {
    str="website.get_title(): "+website.get_title();
    alert(str);
    function onRequestFailed(sender, args) {
    alert('Error: ' + args.get_message());
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Error setting property 'html1' in bean of type null

    Dear All;
    I am currently on site, and away from my team, so they send over additional screens, that i treid to add to the project i have with me, i added the model, i add the SRC folder, and the .JSPX pages, only when i run the pages, i get Error setting property 'html1' in bean of type null, i checked previous threads, and i know the error and accordingly i checked that the page def exists, which it does, and that all the managed beans are there, and linked to faces config, which they are, so i am just wondering if any1 has any idea, as to how to make the pages work...
    regards
    Halim

    hi frank,
    I cross checked, all the entries in the bean, with those in the JSPX source code, and chceked in the auto comment of the JSPX page the name of the bean, i have checked the faces config, i am going to remove the the new models and re-add them, just tell me if i need to add any files other than those:
    MODEL X folder, which contains the model
    JSPX folder, which contans the pages
    SRC folder in view controller
    And the faces config to web-inf
    thanks in advance man
    regards
    Halim

  • Error While Creating New Field thru EEWB

    Hello CRM Experts,
    I have found following Error while adding New Fields through EEWB. Can any one help to analyse and give the solution?
    It gives Error Log as-      System type OLTP with role DEV is not specified correctly. System type OLTP with role DEV is not specified correctly
    Thanks for your reply in advance.

    Hi Priya,
    We are also facing similar error in EEWB. If you have solved this problem, please update thread.
    Thanks
    Dhanraj

  • How can i make the input/output field to a multiple lines in ModulePool...

    hi all...
    can any one please let me know, is there any possibility thru Module Pool program where i can make the input/output field to a multiple lines...
    say, when we drag & drop the input/output field on the screen - it'll come with single line display. so, how to make the same field to multiple lines field.
    rather i can say my question like, how to increase the height of the input/output field.
    Desired Functionality:
    • The user wants to display a long text.
    • now the input/output field should not display the record as a single line, now the field has to display the text in multiple lines (something like wrap option in ms excel).
    hope u got my question...
    please help me in this regards...

    hi Rengith, i'm not using Text Field, i'm using Inpu/Output Field to display the long text.
    If u mean text field as input/output field then can u let me know the process for this, how to do the same thru module pool program...
    Edited by: murashali on Mar 18, 2008 1:36 PM

  • Flash builder - 101 - access the property of an  object in a component

    hi all,
    very basic Q for flash builder -> air app ->
    |-mainapp.mxml
    |-components.master.mxml
    |-com.xlab.mca.mytest.as
    {not full code}
    in the mainapp.mxml
    xmlns:xtra="components.*
    <xtra:master>
    </xtra:master>
    in master.mxml I have a text input field 
    <s:TextInput x="106" y="72" id="textinput1"/>
    from an onclick I am calling an AS3 component
    import com.xlab.mca.mytest; //THIS WORKS FINE
    in the component mytest.as I have to get the value of the textinput
    var ttt:String;
    ttt = escape(FlexGlobals.topLevelApplication.textinput0.text);
    if I have the textinput in the mainapp.mxml it works fine,
    but how do I access the property if it is in a component.*
    thx
    Art

    and where would i put the remove.simpleScreen ( simpleScreen is the loader i would want to remove )
    would it be on the external swf on frame 1 where the slideshow plays?
    or in the main timeline's category's frame?
    the problem ( that i see ) is that both loaders are on the same frame ( different layers tho )
    so if i put a the remove simplescreen there it wont show me the pictures when i click the thumbs
    or could i make it so that it removes it BECAUSE its playing on frame 1 ?

  • No message for validation error "format", type "date", field "date-expired"

    Dear
    Guys,
    i am getting the following error : ((No message for validation error "format", type "date", field "date-expired"))
    When trying to upload adobe connect 7 license to the adobe connect 7 configuration wizard. the problem occurs because my server was install on Arabic Saudi Arabia date format while installation, but if i change the windows date format to US then the problem still occurs, and formatting windows is not possible, could anybody help??
    Regards

    Thank you for replying,
    No i am not on host mode, a have installed it deferent times ago successfully, but the only problem now is that during the installation windows server 2008 the default language, time and date. Was set Arabic Saudi Arabia. And even changing it does not solve the problem, as i mentioned above.

  • Can not open any open any web pages. Receive the following error message (Error code: sec_error_library_failure)

    I can not open any websites using Mozilla browser. I have attached a screen shot of the error message that I receive. You will also find it below: .
    Secure Connection Failed
    An error occurred during a connection to www.google.com. security library failure. (Error code: sec_error_library_failure)
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.
    This error appears on all pages that I try to browse to. All other browsers work fine on my computer.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

Maybe you are looking for

  • 5800 alarm problem

    My phone has a problem with the alarm, it doesn't ring at the right time, sometime 2 min. late, sometime 15 min. late & sometime even 30 min. late. I have upgraded the firmware of my phone from v21 to v31 formatted the memory card & the hard reset th

  • Pricing Schema for Project System

    Dear Sappers, I'm configuring Pricing Schema for Project System(PS) module. The requirement is, the schema will be in such a way that it supports both excise, CST, VAT and service tax. In PS module the user raises a Purchase Order having procurement

  • Converting iPhoto slideshow to DVD

    I have created a slideshow in iPhoto consisting of appproximatly 150 images. I have used the ability to set the display time for each image to coordinate the images with the audio. Playing the resulting slideshow in iPhoto is great. I want to convert

  • Data binding via datasocket opcservers V5

    Hello! Everyone I met a problem of opcservers V5,when I try to use databinding of a indicator via datasocket to select National Instrument.OPCServers.V5, error report dialogue shows that the opc servers are not be totally installed or security settin

  • Mass for PO

    when i m doing  Purchase order deletion by MAss t.code than system showing error msg... Purchasing document has release indicator R (changes not possible)       Message no. 06683                                                pls tell me how i will d