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

Similar Messages

  • How can I get anniversaries to show on my calendar from my contact list?

    How can I get anniversaries to show on my calendar from my contact list?

    well i dont know if this is what you want but you could says it is a birthday and it will tell you when it is, it can remind you, and even tell you what number (i.e. 23rd anniversary)
    - actually nevermind that wont work because it will always say birthday and you cant have two birthdays scheduled for the same person. i do not think that is possible without actually putting it in calendar to repeat every year and just telling you. Sorry.

  • My daughter has a new ipod touch and when synced it had all of my iphone contacts. she deleted the ones she didn't want and they were removed from my phone as well. How can I get them back if they were deleted from the cloud? I also had them on my pc

    My daughter bought a new ipod touch and when synced received the contacts from my iphone. She deleted the ones she didn't want on her ipod and now they are gone from my iphone. I have the cloud and i thought back up on itunes. I have tried to re-sync and no luck. How can I get my contacts back?

    Your problem is that she used your icloud ID to connect to icloud and thus had all your data synced to her device.  Contacts are not saved in a backup to icloud, since they are stored independently in the Contacts section of icloud.  If someone deletes them, they are gone.  If you had them on the PC would they be available in some backup you frequently make of the PC?

  • I deleted my phone from the list after trying to back it up how can I get it back and back up my phone , the only one showing on the phone is my ipad which is synced to it

    I wanted to back up my phone as have bought a new 6 so went to settings I cloud then back up but it wouldn't turn on . I went in to view the backups and it wasn't done since September last year , then I clicked on my phone detail and made a mistake of pressing delete back up . the phone now isn't listed just my ipad which is linked to the phone . So how can I back this phone up please and perhaps restore the phone detail in backups

    Your title asks "How do I get my iPhone information back on my (iPhone)?
    You also said "I have yet to back it up."  Therefore, all your information that had been on your iPhone is now gone.
    Your iPhone has (and will continue to) been refreshed from iTunes.

  • How can I get mouse pressed and mouse released positions on the desktop whi

    Hello All,
    I am generating a Frame using Swing API. My requirement is I need to capture the mouse pressed and mouse released positions, whenever user drags the mouse on desktop region (i.e. outside of the Frame). I require these points to find the rectangle region user has generated starting from mouse pressed to mouse released position. I need to pass that rectangle to Robot class in order to capture that desktop region.
    Can anybody help me out how can I achieve this using java on MAC, Linux and Windows platforms?
    Thanks in advance.
    Regards,
    VPKVL

    VPKVL wrote:
    DarrylBurke wrote:
    Can't be done in Java.I don't think that there is something which can't be done using java. When searched over net, found few applications which are using java for implementing this feature but not free, asking for license fee. I checked by downloading the demo version.
    Just want to know the hint how it can be achieved so that I can move further on that lines.
    Your thoughts ?They use JNI with the OS API.

  • How can I get my email and message notifications back on the lock screen after the 5.01 upgrade?

    After the 5.01 Lollipop upgrade I lost my email, text and voice mail notifications on the lock screen on my LG G3.  How do I get them back?

    Still didnt work...i dont know whats wrong.. i want them to look like this...

  • HT1689 How can I get a refund on a purchased app from the App Store?

    I purchased an app from the App Store and did not get an email receipt.  After opening the app, I found it didn't do what I thought it was designed to do.  I can't seem to find out how to get a refund from my recent purchase.  Any help would be appreciated.

    Try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via the Store > View Account menu option and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that app and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, about 24 hours).
    If the 'report a problem' link doesn't work (it's been taking some people to this site on a browser instead of showing a form in iTunes) then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • How can I get my music back onto my iPhone from the the cloud

    I have a new primary PC.  My music Library is on an old dying laptop.  I have found all my music has disappeared from my phone.  Some is on the cloud, but it appears to only be the music purchased on iTunes, only about 1/3 of my collection.  Now I find all the songs on my iPhone are ONLY iTunes songs and I have to download them each time I want to play them.  Since I'm in a regional area with poor coverage, having to download my own songs every time through cellular is ridiculous! How can I copy my entire collection back onto my iPhone?  And then where's the rest of my collection?  Will I have to rip all my cd's again? If so NOT HAPPY AT ALL. Have also lost all my ringtones which were a Podcast that WAS purchased through iTunes - now gone.

    I did this last night, and copied all the music from old laptop onto new one.  But there was still a lot of stuff missing, mainly from my own CDs that I'd ripped.  Also I'm still getting the icon on my iPhone that the music is on the iCloud. This doesn't suit me because it will cost me a fortune to download each song by cellular when I'm out driving.  I need all my stuff on my iphone.  Do you know how I can get it to download everything i need apart from clicking on every album and selecting "download" from cloud one at a time?

  • How can I get new windows to open On Top Of the current window, not Behind the current window?

    Regarding the Options checkbox to "When I open a link in a new page, switch to it..." I already have that box checked, but still windows are opening behind my current window.

    Hello MichaelDMiller60, '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the 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 other users who have the same problem.''
    Thank you.

  • If I change my Apple ID, can I get my iTune and App purchases transferred from the old to the new ID?

    I have a child who is now of age to create an Apple ID.  If I create a new Apple ID, can I tranfer the iTune and App Store purchases from my existing Apple ID to the new one for my child?

    No, it's not currently possible to transfer content from one account to another account - all items remain tied to the account that originally bought/downloaded them, so they will remain tied to your account.
    As long as your account is authorised on the computer's iTunes that he/she syncs to, and those items are in its library, then he/she should be able to continue to have them on their device (though only your account will be able to download updates to those apps)

  • I have recently bought a new netbook. all my itunes songs are stored on an external drive, however when i downloaded itunes again for the new netbook, they no longer showed in itunes. how can i get my song and podcast library over to the new netbook?

    can anyone help with this please? i feel its wrong to have to pay Apple £25 for something that should be more obvious and easier to do.

    Go into the iTunes preferences and turn off the options that have you Copy Music To My Library.
    Then, add the top folder which contains your music to iTunes - it will create links to your remote folder rather than copy all music to your netbook.
    ** Edit
    You can set the location of your music here too.

  • How can I get back all of my family videos from the iTunes monster?

    So here's the thing.
    Over the past few years I have accumulated a whole heap of home videos as well as movies, TV episodes etc. etc. which has grown and grown to the point where there was no more space on my 60GB hard drive.
    So I go out and buy an 80GB video iPod so that I can store the videos on that.
    I go through the extremely lengthy (3 days) and frustrating process of converting all my files to mp4 using Videora converter and load them onto iTunes and then onto my new iPod. I then click 'Manually manage songs' in my iPod options so that I could delete the videos from my computer, and have them still on my iPod. This was about a week ago and since then everything has been fine.
    When updating my iPod this morning, I manually ejected the ipod once my new music was added, only to find that the ipod now contained NO VIDEOS! As it turns out, the iPod automaticaaly reverted to 'automatcally manage files' without my prompt.
    So now whilst I have the files on iTunes, they cannot be found as they have been deleted and they are no longer on my iPod. Is there ANY way that I can get them back? Anything at all? System restore or something?
    Any help would be greatly appreciated.
    Dell Inspiron 8600   Windows XP  

    if you mean restore an backup from an earlier iphone then it ask you or you can manually choose restore
    if you mean apps located in your itunes library then you check the apps you want on the iphoen in the apps tab when you have it connected to computers itunes

  • How can I get my Photosmart B8550 to print envelopes from the photo tray?

    I have a Photosmart B8550 printer.  I print a LOT of envelopes for greeting cards through Stamps.com.  I would like to be able to load invitation envelopes in the photo tray so I don't have to keep switching between paper and envelopes.  I tried it and the only thing it will print is photo paper (or 4x6 card stock)

    Hi,
    Connect your printer to the network router.
    1. Wireless>Wireless Settings>Wireless Setup Wizard.
    2. Enter the router password to connect your printer.
    or
    1. Run the HP software and select the network/wireless connection method.
    After printer is successfully connected to the network, enable Web Services/ePrint.
    1. Press the ePrint button on the printer or the Web Services icon on the printer front panel.
    2. Press Yes to accept terms of web services.
    3. Press Yes to accept future updates.
    4. A page will printout showing you how to register your printer's new email address which you will use to send your ePrints to.
    Please click the blue Kudos star in the post that helped you.

  • I can not get real audio player to record videos from the internet, I believe the problem is that my Firefox browser is set for 64 bi... i need to change it to 32 and do not know how.

    I can not get real audio player to record videos from the internet i use firefox as my browser on windows 7, I believe the problem is that my Firefox browser is set for 64 bi... i need to change it to 32 and do not know how.

    dont know what to do

  • How can i get my items to stay in place and not cross over each other when readjusting the browser s

    How can i get my items to stay in place and not cross over each other when readjusting the browser size.
    Basically on my site when i go from a small screen to a big screen everything doesn't adjust to the screen size. I don't know what im missing
    Here's the link to the page all the pages & they all do it
    http://theatricalworkslive.com/
    Thanks in advance

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem.  Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

Maybe you are looking for

  • Unable to print special character in SAP script

    Hi,   There is an address which needs to be hardcoded in a SAP Script form. It looks like: Česká republika s.r.o Karla Engliu0161e 3219/4 Česká republika IČO:  25635972 The letters which has got a tilde and sign above them are appearing as a hash '#'

  • Can Aperture import keywords and ratings from Lightroom?

    Decided to download the Aperture trial, and imported 17,000 images without a problem until I realised that my keywords and star ratings are missing (and even some vertical shots are horizontal). Is there a way to get Aperture to look at the sidecar f

  • Federated Portal Registration

    Hi, I have Problem With WSDL in not Get Connected thanks swati

  • My computer freezes when I connect my iPod

    My iPod won't turn on, I've left it plugged in my iHome to charge for 4+ hours. After that didn't work I decided to plug it into my computer to do the restore feature. but when I plugged my iPod in, my computer freezes up. It stays that way and won't

  • Mail french accent, event with french version of Tiger!

    ****, I have the same issue since many years, I can't send an email to my customer without having a lot of bug: +Est-ce que ça doit être en format PowerPoint absolument? J'ai fait plusieurs projets de ce type et ils ont tous été réalisés avec