CmsPosting_Approved event - how to differ new from re-approved?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > CmsPosting_Approved event - how to differ new from re-approved?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    CmsPosting_Approved event - how to differ new from re-approved?  
Søren Andersen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-06 03:49 AM

Hello world,

In Global.asax I capture the CmsPosting_Approved in order to send
notifications when postings in certain channels are approved.

However, the notifications should only be sent when it's a new posting
being approved - not when an existing posting is being re-approved
after it's been edited.

How do I make this distinction?

Cheers,
Soren






[ Post a follow-up to this message ]



    RE: CmsPosting_Approved event - how to differ new from re-approved?  
Adnan Al-Ghourabi


Report This Message To A Moderator Edit/Delete Message


 
02-18-06 03:49 AM

One way is to check StartDate property of the Posting object, which tells yo
u
when the page first became live (assuming that approving a page would publis
h
it..i.e. you don't have any custom work-flow). Another is to use the
Revisions method. The default method returns all revisions, whether they wer
e
caused by modifying the posting itself, or as a result of a change to a
shared Resource used by the posting. There are overloaded methods that you
can use to exclude Resources and only include revisions caused by approving 
a
Posting, which should be enough to know whether a Posting was approved befor
e.

You can read more about it here
http://msdn.microsoft.com/library/d...g_Revisions.asp

I hope this helps!

"Søren Andersen" wrote:

> Hello world,
>
> In Global.asax I capture the CmsPosting_Approved in order to send
> notifications when postings in certain channels are approved.
>
> However, the notifications should only be sent when it's a new posting
> being approved - not when an existing posting is being re-approved
> after it's been edited.
>
> How do I make this distinction?
>
> Cheers,
> Soren
>
>





[ Post a follow-up to this message ]



    Re: CmsPosting_Approved event - how to differ new from re-approved?  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-06 03:49 AM

Hi Soren,

you could check the Revision collection of the posting object.
If it contains a revision it is an old posting as a new revision is created
during approve.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Søren Andersen" <san@mondo.dk> wrote in message
news:1140011599.561245.136250@g44g2000cwa.googlegroups.com...
> Hello world,
>
> In Global.asax I capture the CmsPosting_Approved in order to send
> notifications when postings in certain channels are approved.
>
> However, the notifications should only be sent when it's a new posting
> being approved - not when an existing posting is being re-approved
> after it's been edited.
>
> How do I make this distinction?
>
> Cheers,
> Soren
>







[ Post a follow-up to this message ]



    Re: CmsPosting_Approved event - how to differ new from re-approved?  
Søren Andersen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-06 03:50 AM

Of course. That works a treat. Thank you, Stefan.

Rgds,
S=F8ren






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:44 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register