How to programmatically identify that page is being published first time ?

Hello,
I need to check whether page has been published first time.
using SPListitem.Level can check whether page is published/draft/checkout, however how can I check whether its being published first time ?
Would you please let me know if there is any way ?
Thanks and Regards,
Dipti
Dipti Chhatrapati

hi
try _listItem.File.Versions.Count instead. If it will still throw exception, then instead of retrieving count try to iterate over _listItem.File.Versions collection and check latest version inside loop body (see e.g. here:
How to retrieve File version from SPListItem).
Blog - http://sadomovalex.blogspot.com
Dynamic CAML queries via C# - http://camlex.codeplex.com

Similar Messages

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. Can someone help me?

    So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. I am getting quite annoyed because apples hours arent the best fitted to my scedule since I have school and work, so I cant call and ask how to get fixed. Please help me all I want to do is buy some music...

    Click here and fill out the form.
    (90729)

  • When i clink a given link in google than that webpage open in another window. How i can open that page in the same tabe ?

    when i clink a given link in google search than that webpage open in another window. How i can open that page in the same tabe ?

    Hello gogotutu
    In the [https://support.mozilla.org/en-US/kb/awesome-bar-find-your-bookmarks-history-and-tabs#os=win7&browser=fx17 Location bar], type [http://kb.mozillazine.org/About:config about:config ]and press '''Enter'''.
    The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page.
    In the Search field, type [http://kb.mozillazine.org/Browser.link.open_newwindow browser.link.open_newwindow]
    double-click and put as a value '''1''' , click OK to save it.
    do the same with '''browser.link.open_newwindow.override.external''' , again put '''1''' as a value(it is -1 by default).
    check also, always in about:config, the [http://kb.mozillazine.org/Browser.link.open_newwindow.restriction browser.link.open_newwindow.restriction] and put as value''' 0''' .
    thank you

  • In Microsoft Service Manager how can I Identify that one Change Request is backed out or not.

    In Microsoft Service Manager how can I Identify that one Change Request is backed out or not.

    Hi,
    It seems that he means "Not Approved"
    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn:
    Graveyard:

  • Please provide minute path to verify iWeb page already being published on 1und1 domain provider on google. Thank you.

    Please provide minute path to verify iWeb page already being published on 1und1 domain provider on google. Thank you.
    Bitte um specifischen Pfad um eine bereits bei 1und1 domain server bei google zu verifizieren. Vielen Dank

    Download the html file google provides and put it in the root of your webserver.
    Root is where you publish your webpages.
    It's the file at the right of your your domainname.
    Example:
    http://www.yourdomainname.com/index.html
    index.html is in the root.
    To verify your site and if the google file has a name like dfrrndfbfgn.html, you provide this url to google :
    http://www.yourdomainname.com/dfrrndfbfgn.html
    Practice. And note that iWeb is not part of it.

  • I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    You need to force the phone into recovery mode, as described here, & restore it:
    http://support.apple.com/kb/ht1808
    Sorry, you've already lost all data on your phone.

  • How is it possible that in preference the lock by Time Machine is unlocked the day after i locked it

    How is it possible that in preference the lock by Time Machine is unlocked the day after i locked it

    The crossdomain security policy stuff is annoying, but it's there to prevent this sort of scenario:
    Joe Blackhat writes a flash game about Bob the Goldfish. Joe Blackhat decides that a fun thing to do might be to write an SMTP client in ActionScript so that fans of Bob the Goldfish could unknowingly send spam while they play. Bob the Goldfish game goes viral. Everyone is playing it and spam volume bajillion-duples. Spam kills the internet. The End.
    This is facetious and contrived, but without crossdomain security policies, the internet would be a much more dangerous place. JavaScript has even more restrictive crossdomain policies. I don't think this is going away.

  • Slow performance pages when accessing for first time

    Hi Oracle developers,
    Hope this is the right place to ask my question regarding Fusion Applications performance.
    I'm dealing with a hard issue in our Fusion Applications 11.1.7 'test' environment for educational purposes. The thing is that whenever a page is accessed the first time (after a restart) it takes a very long time for the page to appear on the screen.
    When it has been accessed before the page is rendered almost instantly. I suspect this has to with caching/compilation of the pages.
    I already looked at article (Doc ID 1518515.1) and the settings were already set as is described in the solution part of the note.
    My question:
    Is there a fix for this?
    Is there a way to precompile all Fusion Applications JSP pages after a restart.
    Hope you can help me out with this!
    Kind regards,
    Charif

    Hi Charif,
    we are looking into ways to speed this up, but at the moment there is nothing you can do to avoid this delay.  I know this sounds vague, but I cannot discuss future potential features here.
    Thanks,
    Oliver
    Fusion Applications Developer Relations
    @fadevrel
    http://blogs.oracle.com/fadevrel
    http://youtube.com/FADeveloperRelations

  • What to do that Safari is like the first time who i opened it

    How to uninstall Safari?
    What can i do that Safari is like the first time where i opened it?
    Because i got an Error Message if i would like to open a ne file, and I know that i have to do this that evrything is ok.
    So my question: What can i do that Safari is like the first time who I opened it?
    Thank you and I hope you understand my english..

    Install or Reinstall Mavericks or Mountain Lion from Scratch
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    OS X Mavericks- Erase and reinstall OS X
    OS X Mountain Lion- Erase and reinstall OS X
    OS X Lion- Erase and reinstall Mac OS X
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.

  • TS3297 I am wanting to make a purchase from a new computer, but after I enter my id and password it says that because it is my first time purchasing from this computer I have to answer my security question, but it says my answer is incorrect and to contac

    I am wanting to make a purchase from a new computer, but after I enter my id and password it says that because it is my first time purchasing from this computer I have to answer my security question, but it says my answer is incorrect and it says if you can't remember answers to the two questions to contact you

    1. See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities.
    2. Here are two different but direct methods:
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contacting Apple for support
            and service.
    3. For other queries about Apple ID see Frequently asked questions about Apple ID.
    4. Rescue email address and how to reset Apple ID security questions
    It may say to contact Apple, but not us. We are just a user forum.

  • My iPad keeps prompting me to verify due to being to first time it is being used every time I attempt to download an app

    My iPad keeps prompting me to verify myself due to being the first time I have used the iPad every time I attempt to download an app?

    http://support.apple.com/kb/TS1646.

  • How do I activate factory unlocked iphone 5 for  first time

    How do I activate factory unlocked iphone 5 for  first time?Should i connect to itunes?Or should I put the sim first and then ON the device?Pls help me

    Yes.
    Insert the SIM card and power the iPhone on to find out. Nothing bad can happen if you can't and if you can't for some reason, connect the iPhone to iTunes.

  • How can i exclude information pages from being printed in a dynamic XML form?

    Hi there,
    i am building a dynamic XML form in Adobe LiveCycle Designer ES2.
    In this form there are pages with information that help the end user fill out the form, but to use - those who process the forms after they have been sent to us - these pages with information are irrelevant.
    Is there a way to tell the form to omit these pages when printing.
    Currently i have set the pages mentioned to be only visable on-screen.  But doing so results in an empty page being printed (only the master page information is visable.)
    Any ideas how i can solve this issue?
    Thank you.

    Create a new master page and set that page to visible screen only. Set your subforms to use that master.

  • How to programmatically Identify the Phase from a managed bean

    How can we identify the Phase from a normal managed bean method ?
    This managed bean method is a method activity in a task-flow. How can we identify the phase..?
    If there is an event then, we can identify the phase using event.getPhaseId() but here there is no event. Can I get the phase programmatically ?
    Thanks

    Hi,
    You won't need that with a PhaseListener. You could use something like the following:
    public class CurrentPhaseListener implements PhaseListener
        private static ThreadLocal<PhaseId> currentPhaseId = new ThreadLocal<PhaseId>();
        public static PhaseId getCurrentPhaseId()
            return currentPhaseId.get();
        public void afterPhase(PhaseEvent ev)
            currentPhaseId.remove();
        public void beforePhase(PhaseEvent ev)
            currentPhaseId.set(ev.getPhaseId());
        public PhaseId getPhaseId()
            return PhaseId.ANY_PHASE;
    }Regards,
    ~ Simon

Maybe you are looking for