Get attachment list items

Hi,
in transaction ME21N (or ME22N & ME23N), i created some notes with Generic Object Service.
Now, in ABAP i would like to get back items of this list. Can you send me an ABAP example ?
Thanks for your help.
Cheers.

Try something like following
PARAMETERS P_EBELN LIKE EKKO-EBELN.
DATA : GS_OBJECT   TYPE          SIBFLPORB,
       GT_LINKS    TYPE TABLE OF OBL_S_LINK,
       GS_LINKS    TYPE          OBL_S_LINK,
       GS_FOLDERID TYPE          SOODK,
       GS_OBJECTID TYPE          SOODK,
       GS_NOTE_HD  TYPE          SOOD2,
       GT_NOTE_LN  TYPE TABLE OF SOLI WITH HEADER LINE.
GS_OBJECT-INSTID = P_EBELN.
GS_OBJECT-TYPEID = 'BUS2012'.
GS_OBJECT-CATID  = 'BO'.
TRY.
    CALL METHOD CL_BINARY_RELATION=>READ_LINKS_OF_BINREL
      EXPORTING
        IS_OBJECT    = GS_OBJECT
        IP_RELATION  = 'NOTE'
      IMPORTING
        ET_LINKS     = GT_LINKS
*      ET_ROLES     =
  CATCH CX_OBL_PARAMETER_ERROR .
  CATCH CX_OBL_INTERNAL_ERROR .
  CATCH CX_OBL_MODEL_ERROR .
ENDTRY.
LOOP AT GT_LINKS INTO GS_LINKS.
  GS_FOLDERID = GS_LINKS-INSTID_B+00(17).
  GS_OBJECTID = GS_LINKS-INSTID_B+17(17).
  CALL FUNCTION 'SO_OBJECT_READ'
    EXPORTING
*   FILTER                           =
      FOLDER_ID                        = GS_FOLDERID
*   FORWARDER                        =
      OBJECT_ID                        = GS_OBJECTID
*   OWNER                            =
*   F_MAILER                         = ' '
IMPORTING
*   OBJECT_FL_DISPLAY                =
    OBJECT_HD_DISPLAY                = GS_NOTE_HD
*   OBJECT_RC_DISPLAY                =
TABLES
    OBJCONT                          = GT_NOTE_LN[]
*   OBJHEAD                          =
*   OBJPARA                          =
*   OBJPARB                          =
EXCEPTIONS
   ACTIVE_USER_NOT_EXIST            = 1
   COMMUNICATION_FAILURE            = 2
   COMPONENT_NOT_AVAILABLE          = 3
   FOLDER_NOT_EXIST                 = 4
   FOLDER_NO_AUTHORIZATION          = 5
   OBJECT_NOT_EXIST                 = 6
   OBJECT_NO_AUTHORIZATION          = 7
   OPERATION_NO_AUTHORIZATION       = 8
   OWNER_NOT_EXIST                  = 9
   PARAMETER_ERROR                  = 10
   SUBSTITUTE_NOT_ACTIVE            = 11
   SUBSTITUTE_NOT_DEFINED           = 12
   SYSTEM_FAILURE                   = 13
   X_ERROR                          = 14
   OTHERS                           = 15
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  WRITE:/ 'TITLE :' ,GS_NOTE_HD-OBJDES.
  LOOP AT GT_NOTE_LN.
    WRITE:/ GT_NOTE_LN-LINE.
  ENDLOOP.
ENDLOOP.

Similar Messages

  • Get Calendar List Item GUID

    I downloaded code for a reservation event receiver from here: 
    http://blog.sharepointsydney.com.au/post/Setting-up-multiple-calendars-for-meeting-room-bookings-prevent-double-booking.aspx
    However, on the ItemUpdating it throws an "Object Reference Not Set to an Instance of an Object" error.  By commenting out parts of the code and re-deploying I have narrowed the issue down to the line that gets the item's GUID:
    string guid_internal = collItems.List.Fields["GUID"].InternalName;
    When I modify it to something like "UniqueId" I get the "Value does not fall within expected range" error.  Is there a better way to obtain the GUID of the calendar list item - or am I missing something?  Full code below:
    using System;
    using Microsoft.SharePoint;
    namespace Webcoda.WSS.Calendar.Events
    class PreventDoubleBooking: SPItemEventReceiver
    /// <summary>
    /// This event is triggered when the user adds a new item
    /// </summary>
    /// <param name="properties"></param>
    public override void ItemAdding(SPItemEventProperties properties)
    //Our query string variable
    string strQuery = null;
    try
    //Get the Sharepoint site instance
    using (SPWeb oWebsite = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl))
    //Get the collection of properties for the Booking item
    SPListItemCollection collItems = oWebsite.Lists[properties.ListTitle].Items;
    //Get the Calendar List that we will be querying against
    SPList calendar = oWebsite.Lists[properties.ListId];
    //Get the internal name of the fields we are querying.
    //These are required for the CAML query
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    string MeetingRoom_Internal = collItems.List.Fields["Meeting Room"].InternalName;
    //Get the query string parameters
    string start_str = properties.AfterProperties[start_internal].ToString();
    string end_str = properties.AfterProperties[end_internal].ToString();
    string MeetingRoom_str = properties.AfterProperties[MeetingRoom_Internal].ToString();
    //Construct a CAML query
    SPQuery query = new SPQuery();
    //Create the CAML query string that checks to see if the booking we are attemping
    //to add will overlap any existing bookings
    strQuery = string.Format(@"
    <Where>
    <And>
    <Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Gt>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Gt>
    </And>
    <And>
    <Lt>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Lt>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    </Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    <And>
    <Geq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Geq>
    <Leq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Leq>
    </And>
    </Or>
    </Or>
    <Eq>
    <FieldRef Name='Meeting_x0020_Room' />
    <Value Type='Choice'>{2}</Value>
    </Eq>
    </And>
    </Where>
    <OrderBy>
    <FieldRef Name='EventDate' />
    </OrderBy>
    ", start_str, end_str, MeetingRoom_str);
    //Set the query string for the SPQuery object
    query.Query = strQuery;
    //Execute the query against the Calendar List
    SPListItemCollection existing_events = calendar.GetItems(query);
    //Check to see if the query returned any overlapping bookings
    if (existing_events.Count > 0)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage += "This booking cannot be made because of one or more bookings in conflict. <BR><BR>";
    //Here you can loop through the results of the query
    //foreach (SPListItem oListItem in existing_events)
    properties.ErrorMessage += "Please go back and schedule a new time.";
    catch (Exception ex)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage = "Error looking for booking conflicts: " + ex.Message;
    /// <summary>
    /// This event is triggered when the user edits an calendar item
    /// </summary>
    /// <param name="properties"></param>
    public override void ItemUpdating(SPItemEventProperties properties) {
    string strQuery = null;
    try {
    //Get the Sharepoint site instance
    using (SPWeb oWebsite = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl)) {
    //Get the collection of properties for the Booking item
    SPListItemCollection collItems = oWebsite.Lists[properties.ListTitle].Items;
    //Get the Calendar List that we will be querying against
    SPList calendar = oWebsite.Lists[properties.ListId];
    //Get the internal name of the fields we are querying.
    //These are required for the CAML query
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    string MeetingRoom_Internal = collItems.List.Fields["Meeting Room"].InternalName;
    string guid_internal = collItems.List.Fields["GUID"].InternalName;
    //Get the query string parameters
    string start_str = properties.AfterProperties[start_internal].ToString();
    string end_str = properties.AfterProperties[end_internal].ToString();
    string MeetingRoom_str = properties.AfterProperties[MeetingRoom_Internal].ToString();
    string guid_str = properties.AfterProperties[guid_internal].ToString();
    //Construct a CAML query
    SPQuery query = new SPQuery();
    //Create the CAML query string that checks to see if the booking we are attemping
    //to change will overlap any existing bookings, OTHER THAN ITSELF
    strQuery = string.Format(@"
    <Where>
    <And>
    <And>
    <Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Gt>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Gt>
    </And>
    <And>
    <Lt>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Lt>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    </Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    <And>
    <Geq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Geq>
    <Leq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Leq>
    </And>
    </Or>
    </Or>
    <Eq>
    <FieldRef Name='Meeting_x0020_Room' />
    <Value Type='Choice'>{2}</Value>
    </Eq>
    </And>
    <Neq>
    <FieldRef Name='GUID' />
    <Value Type='GUID'>{3}</Value>
    </Neq>
    </And>
    </Where>
    <OrderBy>
    <FieldRef Name='EventDate' />
    </OrderBy>
    ", start_str, end_str, MeetingRoom_str, guid_str);
    //Set the query string for the SPQuery object
    query.Query = strQuery;
    //Execute the query against the Calendar List
    SPListItemCollection existing_events = calendar.GetItems(query);
    //Check to see if the query returned any overlapping bookings
    if (existing_events.Count > 0)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage += "This booking cannot be made because of one or more bookings in conflict. <BR><BR>";
    //Here you can loop through the results of the query
    //foreach (SPListItem oListItem in existing_events)
    properties.ErrorMessage += "Please go back and schedule a new time.";
    catch (Exception ex)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage = "Error looking for booking conflicts: " + ex.Message;

    Hi there,
    Please verify the internal name of column which you have hardcoded in the code i.e 
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    I have used the Room reservation template from MSDN which has provided by MS under the code name of "Fantastic 40" along with below James Finn article.
    http://www.codeproject.com/Articles/30983/SharePoint-Reservations
    It worked for me for reservation. 

  • Getting attachment List

    Hi all,
    I would like to display the attachment list in tcode VA03.
    Just wondering how do i do that??
    under system->services for object then get the attachment list...
    just the file description will do..
    any feedback is most welcomed and will be awarded.. thanks.

    hi rob, i still do not know how to acquire the list of attachments...
    i just want to get the attachment description and display it in sapscript.
    thanks..

  • Webpart - Get selected list items

    All,
    I have a SharePoint list and a webpart located above it. In the webpart, I have a button. Is there a way to know the selected list items when user clicks on the button?
    For example, I have a Company list which contains Company A, B, C, and D. User has selected Company A and D. When user clicks on the button of the webpart, could the webpart know that Company A and D has been selected?
    Thanks,

    check this
    http://social.msdn.microsoft.com/Forums/en-US/699166b1-9d98-44bd-b07c-2c508215a11a/how-to-get-the-selectedchecked-list-item-id-in-list-item-view-webpart-using-jquery?forum=sharepointcustomizationprevious
    http://social.msdn.microsoft.com/Forums/en-US/3d15fd44-adb1-4b51-a56e-6811220e5a60/how-to-get-the-selected-item-of-a-sharepoint-list-?forum=sharepointdevelopmentlegacy

  • Getting the version history of a list item

    I am creating a content web part and one the list items is used with versioning. I want to show all the versioning on the page. Is there anyway to do this? maybe using CSOM or something. In Javascript

    Hi,
    According to your post, my understanding is that you want to get the list item version using CSOM or JavaScript.
    There is no directly way to get the list item version using CSOM or REST Api, however, there are alternative options as below.
    We can use the SharePoint List web service
    that exposes Lists.GetVersionCollection Method to return version information for the specified field in a SharePoint list.
    There is a code demo to retrieve the List1 item version, it works like a charm, you can refer to it.
    <script type="text/javascript" src="../Shared Documents/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="../Shared Documents/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript">
    $(function(){
    $().SPServices({
    operation: "GetVersionCollection",
    async: false,
    strlistID: "Lists_1",
    strlistItemID: 1,
    strFieldName: "Title",
    completefunc: function (xData, Status) {
    console.log(xData);
    $(xData.responseText).find("Version").each(function(i) {
    console.log("Name: " + $(this).attr("Title") + " Modified: " + $(this).attr("Modified"));
    </script>
    What’s more, we can also get request to Versions.aspx page to get the list item version.
    There is an article about this topic, you can have a look at it.
    http://stackoverflow.com/questions/24423657/sharepoint-2013-get-splistitem-versions-via-rest
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • InfoPath: Cascading Fields, need to get ID of final selected list item

    I have a two drop down lists in an InfoPath form. They are getting their data from a SharePoint List that has two columns: Objectives, Strategies.
    The drop down lists are cascading. So dropdown list 2 (DDL2) values change depending on what dropdown list 1 (DDL1) is set to.
    So my list looks like this:
    objective 1 - strategy 1
    objective 1 - strategy 2
    objective 1 - strategy 3
    objective 2 - strategy 1
    objective 2 - strategy 2
    The cascading part in InfoPath works correctly. My problem is that I need to get the ID of the item (strategy) selected in DDL2.
    DDL1 gets its values from an external data source (sharePoint list):
    Entries: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW
    Value: d:Objective
    Display name: d:Objective
    DDL2 gets its values from the same external data source (sharePoint list):
    Entries: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Strategies[../d:Objective = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:obj]
    Strategy is filtered based on Objective = Objective
    Value: Strategies
    Display name: Strategies
    How can I get the ID of the Strategy selected in DDL2 so that I can write it out to another column that SharePoint can use in a workflow. The only value returned in for DDL2 is Strategy, no ID option.

    Hi Sonners,
    If you want to get the ID of the selected "Strategy" item in DDL2, I think you may need to use the same approach to retrieve the same external data source(SharePoint list have the Objectives and Strategies columns) on another field, then
    filter the list item ID based on the selected Strategy value in DDL2 which equals to the strategy value in that external SharePoint list.
    Or you don't need to get the list item ID of the "Strategy" selected in DDL2 in InfoPath form, you can directly get the list item ID which is filtered by the condition SharePoint list item "Strategy" column value equals
    to the value selected in DDL2 in Desinger workflow, then use the ID value as you want in workflow.
    I have tried a similar method for another requirement like this
    post, you can take a look.
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Setting Item level access rights on sharepoint list item in ItemAdding event handler

    Hi ,
    I am using sharepoint 2013. I am trying to set item level access rights when a list item is added using the following code snippet,
    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    ConfigureItemSecurity(properties);
    private void ConfigureItemSecurity(SPItemEventProperties properties)
    var item=properties.ListItem;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(properties.SiteId))
    using (SPWeb oWeb = site.OpenWeb())
    item.ParentList.BreakRoleInheritance(true);
    oWeb.AllowUnsafeUpdates = true;
    var guestRole = oWeb.RoleDefinitions.GetByType(SPRoleType.Reader);
    var editRole = oWeb.RoleDefinitions.GetByType(SPRoleType.Editor);
    SPGroup HRGroup = oWeb.SiteGroups.Cast<SPGroup>().AsQueryable().FirstOrDefault(g => g.LoginName=="HR Team");
    SPRoleAssignment groupRoleAssignment = new SPRoleAssignment(HRGroup);
    groupRoleAssignment.RoleDefinitionBindings.Add(guestRole);
    SPUserCollection users = oWeb.Users;
    SPFieldUserValueCollection hm = (SPFieldUserValueCollection)item["HiringManager"];
    SPFieldUserValueCollection pm = (SPFieldUserValueCollection)item["ProjectManager"];
    SPFieldUserValueCollection pmChiefs = (SPFieldUserValueCollection)item["ProjectManagerChief"];
    item.BreakRoleInheritance(true);
    item.RoleAssignments.Add(groupRoleAssignment);
    foreach (SPFieldUserValue staffMember in hm)
    SetRightsOnItem(item, staffMember, editRole);
    foreach (SPFieldUserValue staffMember in pm)
    SetRightsOnItem(item, staffMember, guestRole);
    foreach (SPFieldUserValue staffMember in pmChiefs)
    SetRightsOnItem(item, staffMember, guestRole);
    item.Update();
    private void SetRightsOnItem(SPListItem item, SPFieldUserValue staffMember, SPRoleDefinition role)
    SPUser employeeUser = staffMember.User;
    var userRoleAssignment = new SPRoleAssignment(employeeUser);
    userRoleAssignment.RoleDefinitionBindings.Add(role);
    item.RoleAssignments.Add(userRoleAssignment);
    Nothing is happening though... Is the event handler the right place to do this?
    thank you

    Hi ,
    You can refer to the code working in my environment:
    using System;
    using System.Security.Permissions;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Workflow;
    namespace ItemLevelSecurity.ItemSecurity
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ItemSecurity : SPItemEventReceiver
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    try
    using (SPSite oSPSite = new SPSite(properties.SiteId))
    using (SPWeb oSPWeb = oSPSite.OpenWeb(properties.RelativeWebUrl))
    //get the list item that was created
    SPListItem item = oSPWeb.Lists[properties.ListId].GetItemById(properties.ListItem.ID);
    //get the author user who created the item
    SPFieldUserValue valAuthor = new SPFieldUserValue(properties.Web, item["Created By"].ToString());
    SPUser oAuthor = valAuthor.User;
    //assign read permission to item author
    AssignPermissionsToItem(item,oAuthor,SPRoleType.Reader);
    //update the item
    item.Update();
    base.ItemAdded(properties);
    catch (Exception ex)
    properties.ErrorMessage = ex.Message; properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.Cancel = true;
    public static void AssignPermissionsToItem(SPListItem item, SPPrincipal obj, SPRoleType roleType)
    if (!item.HasUniqueRoleAssignments)
    item.BreakRoleInheritance(false, true);
    SPRoleAssignment roleAssignment = new SPRoleAssignment(obj);
    SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
    roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
    item.RoleAssignments.Add(roleAssignment);
    Thanks,
    Eric
    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].
    Eric Tao
    TechNet Community Support

  • Regd attachment list service

    Dear all,
    I am using Integrated ITS 640 .Basis support pack is 18 . When i try to view the attachments in ME23N tran by clicking the obect service menu >> Attachment list, i am getting attachment list service popup screen for the PO but the screen is blank. When i do the same thing in R/3 GUI i am able to see the attachments for the same PO i checked thru ITS.
    Please help me in this regard.
    Thanks
    Vasu

    Hello Vasu,
    This should have been resolved using the same JVM as previously mentioned in your other message (note 980772).  If it was not then it may be a good idea to open a support message for further assistance.  You can also have the JVM window open and start the log/trace so that more information is available.
    Edgar
    Message was edited by:
            Edgar Chuang

  • Caml query for filtering list item not working as expected in Sharepoint hosted app

    I am trying to filter list item based on particular value.
    var header = "xyz";
    camlQueryHeader.set_viewXml = "<view><Query><Where><Eq><FieldRef Name='Position'/>" + "<Value Type='Text'>" + header + "</Value></Eq></Where></Query></view>";
    Instead of getting filtered list items, I get all the list items. What am I missing?
    Note: I am creating Sharepoint hosted app using CSOM.
    regards, Ritesh Anand

    Hi,
    According to the code provided, I suggest you modify the code like this:
    camlQueryHeader.set_viewXml('<view><Query><Where><Eq><FieldRef Name=\'Position\'/>' + '<Value Type=\'Text\'>' + header + '</Value></Eq></Where></Query></view>');
    Here is a documentation of how to use the viewXml property of SP.CamlQuery object:
    SP.CamlQuery.viewXml Property
    Thanks
    Patrick Liang
    TechNet Community Support

  • Passing Multiple Selected List Items to a "New Item" Form in Another List with Multiselect Lookup Field

    Hi!
    Version Info:  SharePoint 2013 Server Standard (*BTW...I do not have access to Visual Studio*)
    I have two lists, let's call them
    -Assets
    -Asset Checkouts
    "Assets" is the parent list, and "Asset Checkouts" has a lookup column (multiselect) which is tied to the serial # column in the "Assets" list.
    Basically, what I need to accomplish is this:  I would like to be able to select multiple list items in the "Assets" list, and create a new item in "Asset Checkouts", and pre-fill the multiselect lookup column in the NewItem form
    for "Asset Checkouts" with the values from the selected items in "Assets".
    Any ideas or suggestions on how to do this would be most appreciated!
    Thanks!

    Hi,     
    According your description, you might want to add new item in "Asset Checkouts" list when selecting items in "Assets" list.
    If so, we can achieve it with SharePoint Client Object Model.
    We can add a button in the "Assets" list form page, when selecting items, we can take down the values of columns of the selected items, then click this button which will create
    new item in "Asset Checkouts" list with the values needed.
    Here are some links will provide more information about how to achieve it:
    Use
    SP.ListOperation.Selection.getSelectedItems() Method to get the list items being selected
    http://msdn.microsoft.com/en-us/library/ff409526(v=office.14).aspx
    How to: Create, Update, and Delete List Items Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Add ListItem with Lookup Field using Client Object Model (ECMA)
    http://notuserfriendly.wordpress.com/2013/03/14/add-listitem-with-lookup-field-using-client-object-model-ecma/
    Or if you just want to refer to the other columns in "Assets" list when add new item in "Asset Checkouts" list, we can insert the "Assets" list web part into the NewForm page
    of the "Asset Checkouts" list, then when we add new item in the "Asset Checkouts" list, we will be able to look through the "Assets" list before we select values for the Lookup column.
    To add web part into the NewForm.aspx, we need to find the button "Default New Form" from ribbon under "List" tab, then we can add web part in the NewForm.aspx.
    In the ribbon, click the button “Default New Form”:
    Then we can add web part into NewForm.aspx:
    Best regards
    Patrick Liang
    TechNet Community Support

  • CSOM - Fetching list item version history programmatically

    HI,
    Is it possible to get the List item version history programmatically using Client Object model?
    I have checked these links:
    http://www.learningsharepoint.com/2010/07/16/programmatically-get-document-version-history-using-client-object-model-sharepoint-2010/
    but was not able to achieve. I am not looking for Document library, but for a custom list.
    Thanks

    Hi,
    In SharePoint Object Model, there is a
    SPListItem.Versions property
    can help to “Gets the collection of item version objects that represent the versions of the item”.
    However, in SharePoint Client Object Model, this property is not available at this moment.
    A workaround is that we can create a custom WCF web service for consuming from client side, then in this web service, we can use Object Model to access the versions of a list
    item.
    About how to
    create and a custom WCF web service:
    http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/
    This workaround would not be applied to SharePoint Online cause Object Model is needed.
    If there may be some better ideas or solutions about this topic, your sharing would be welcome.
    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

  • CheckBox list item

    hi friends
    i am new with itemrenders how can i get the list item
    checkbox(here checkbox is the itemrender) values
    thanks in advance....

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    mx.controls.List (Flex 3):
    The <mx:List> tag inherits all the tag attributes of
    its superclass, ... [write-only] Used by Flex to suggest bitmap
    caching for the object.
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/List.html
    Displaying icons in a Flex List control at Flex Examples:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    --> <mx:Application xmlns:mx='
    http://www.adobe.com/2006/mxml'
    Link:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    mx.controls.List (Flex 2 Language Reference):
    If the data is incorrect, you can call the preventDefault()
    method to stop Flex from passing the new data back to the list
    control and from closing the
    Link:
    http://livedocs.adobe.com/flex/2/langref/mx/controls/List.html
    Smooth Scroll for Horizontal List - Flex India Community |
    Google:
    I have created image gallery with Horizontal List[Flex 2.0].
    Just as below ref site. My Problem is i need a smooth scroll for
    Horizontal List. where images
    Link:
    http://groups.google.com/group/flex_india/browse_thread/thread/a12441143b98d32c?hide_quote s=no
    Populate the list -- Flex 2.01:
    You populate a list-based form control with the
    <mx:dataProvider> child tag. The <mx:dataProvider> tag
    lets you specify list items in several ways.
    Link:
    http://livedocs.adobe.com/flex/201/html/tutorial_controls_019_4.html
    Selecting multiple items in Flex List and DataGrid controls
    at:
    http://blog.flexexamples.com/2007/11/21/allowing-multiple-selected-items-in-flex-<br>
    list-and-datagrid-controls/ --> <mx:Application
    Link:
    http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid -controls/
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • How do you get the value of a selected list item?

    I have a drop-down list that the user can choose from. How do I get the value of what they selected? I thought I could do this by using the NAME_IN function, but I'm getting FRM-40105 Unable to resolve reference to item X. I don't know what I'm doing wrong.
    Thanks!

    Hi,
    You can use an WHEN-LIST-CHANGED trigger, attached to the list-item itself. And, in this trigger, you can use the name of the item to refer its value.
    For example:
    :block_name.list_item_name
    John

  • SharePoint 2010 Rest API: How to add attachment to a list item via ListData.svc

    Hi
    I have set up a project using the REST API in c# Visual Studio 2010.
    I have added a service reference to the URL //site/_vti_bin/listdata.svc/
    I can query the list and get back data, but I can't retrieve the attachments.
    I can write data to the list, but I can't add attachments.
    Are there any examples of how to add or retrieve attachments using the REST API services.
    Thanks
    Mike

    Hi,                                                             
    If you want to work with list attachments using REST API, here are some links will show how to do this using Javascript:
    http://msdn.microsoft.com/en-us/library/office/dn292553.aspx#FileAttachments
    http://chuvash.eu/2013/02/20/rest-api-add-a-plain-text-file-as-an-attachment-to-a-list-item/
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/06/27/how-to-get-list-item-attachments-using-rest-and-javascript-in-sharepoint-2013.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Convert list item attachment from docx to pdf using Word Automation Services

    I have been trying to convert List Item attachments from docx to pdf using word automation services, it works in a normal document library but when I use the list attachment it throws a null reference error.
    var settings = new ConversionJobSettings();
    settings.OutputFormat = Microsoft.Office.Word.Server.Conversions.SaveFormat.PDF;
    var conversion = new ConversionJob("Word Automation Services", settings);
    conversion.UserToken = SPContext.Current.Site.UserToken;
    var wordFile = SPContext.Current.Site.RootWeb.Url + "/" + wordForm.Url;
    var pdfFile = wordFile.Replace(".docx", ".pdf");
    conversion.AddFile(wordFile, pdfFile);
    conversion.Start();
    Using reflector I was able to see my problem lies in Microsoft.Office.Word.Server.FolderIterator.cs where it uses SPFile.Item which returns NULL
    internal void CheckSingleItem(SPFile inputFile, SPFile outputFile)
    Microsoft.Office.Word.Server.Log.TraceTag(0x67337931, Microsoft.Office.Word.Server.Log.Category.ObjectModel, Microsoft.Office.Word.Server.Log.Level.Verbose, "OM: FolderIterator start a single item: source='{0}'; dest='{1}'", new object[] { inputFile.Url, outputFile.Url });
    Stopwatch stopwatch = Microsoft.Office.Word.Server.Log.StartPerfStopwatch();
    try
    this.CheckInputFile(inputFile.Item);
    this.CheckOutputFile(outputFile.Url);
    Is there any way to get around this?

    Hi Qfroth,
    According to your description, my understanding is that when you use word automation service to convert Word to PDF for list item attachment, it throws the null reference error.
    I suggest you can create an event receiver and convert the word to memory stream like below:
    private byte[] ConvertWordToPDF(SPFile spFile, SPUserToken usrToken)
    byte[] result = null;
    try
    using (Stream read = spFile.OpenBinaryStream())
    using (MemoryStream write = new MemoryStream())
    // Initialise Word Automation Service
    SyncConverter sc = new SyncConverter(WORD_AUTOMATION_SERVICE);
    sc.UserToken = usrToken;
    sc.Settings.UpdateFields = true;
    sc.Settings.OutputFormat = SaveFormat.PDF;
    // Convert to PDF
    ConversionItemInfo info = sc.Convert(read, write);
    if (info.Succeeded)
    result = write.ToArray();
    catch (Exception ex)
    // Do your error management here.
    return result;
    Here is a detailed code demo for your reference:
    Word to PDF Conversion using Word Automation Service
    Best Regards
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for