Avatar of m_a_n
m_a_n
 asked on

SPListItem How to get the last published version?

Hi there,

I will appreciate if somebody can please post the code to find only the last published version of SPListItem.

Thanks.
Microsoft SharePointC#

Avatar of undefined
Last Comment
m_a_n

8/22/2022 - Mon
m_a_n

ASKER
This gets the published SPListItem (omitting any entries which do not have a published version).

What I need is "Get the last published version in an SPListItem, even if the latest version is not published".

Thanks for the effort buddy!
m_a_n

ASKER
Any clues? Anybody? This is still open!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
jagssidurala

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
m_a_n

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
m_a_n

ASKER
agssidurala was quite close, just missing a few lines as noted in my comment.

Thanks all.
jagssidurala

Thank you for accepting my sol.

Can u also post ur entire code so that i will know whole functionality....
m_a_n

ASKER
jagssidurala was quite close, just missing a few lines as noted in my comment.

Thanks all.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.