dynamically creating custom property definitions
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
dynamically creating custom property definitions

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
Nikolaj
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: dynamically creating custom property definitions Reply with quote

I have implemented a way to create custom property definitions dynamically.
The prperty definitions are created when the user clicks edit in the console.
When the user clicks "save" values are stored in the newly created custom
properties.

The only problem is that the method fails when a posting is locked by
someone else. When creating the custom property definitions I get an
exception with the text:
"Cannot modify object. The object is already checked out by another user on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of lost the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj
Back to top
Stefan [MSFT]
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Hi Nikolaj,

so you mean it happens when you update the template definition?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:B8A61D2C-0801-4E69-B1AC-EC2C8C8D4227@microsoft.com...
Quote:
Yes.

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually the new custom property definition will be added to the
template
and not to the posting.
There is no way to add it to the posting without modifying the template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role higher
than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in
the
console.
When the user clicks "save" values are stored in the newly created
custom
properties.

The only problem is that the method fails when a posting is locked
by
someone else. When creating the custom property definitions I get
an
exception with the text:
"Cannot modify object. The object is already checked out by
another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort
of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj





Back to top
Nikolaj
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Yes.

"Stefan [MSFT]" wrote:

Quote:
Hi Nikolaj,

actually the new custom property definition will be added to the template
and not to the posting.
There is no way to add it to the posting without modifying the template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role higher than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in the
console.
When the user clicks "save" values are stored in the newly created
custom
properties.

The only problem is that the method fails when a posting is locked by
someone else. When creating the custom property definitions I get an
exception with the text:
"Cannot modify object. The object is already checked out by another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj





Back to top
Stefan [MSFT]
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Hi Nikolaj,

actually the new custom property definition will be added to the template
and not to the posting.
There is no way to add it to the posting without modifying the template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
Quote:
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role higher than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in the
console.
When the user clicks "save" values are stored in the newly created
custom
properties.

The only problem is that the method fails when a posting is locked by
someone else. When creating the custom property definitions I get an
exception with the text:
"Cannot modify object. The object is already checked out by another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj


Back to top
Nikolaj
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

It is creating the new custom property definitions that causes the exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Quote:
Hi Nikolaj,

actually if you modify the custom property with a user role higher than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in the
console.
When the user clicks "save" values are stored in the newly created custom
properties.

The only problem is that the method fails when a posting is locked by
someone else. When creating the custom property definitions I get an
exception with the text:
"Cannot modify object. The object is already checked out by another user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj


Back to top
Stefan [MSFT]
Guest





Posted: Mon Jan 17, 2005 6:14 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Hi Nikolaj,

actually if you modify the custom property with a user role higher than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
Quote:
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in the
console.
When the user clicks "save" values are stored in the newly created custom
properties.

The only problem is that the method fails when a posting is locked by
someone else. When creating the custom property definitions I get an
exception with the text:
"Cannot modify object. The object is already checked out by another user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj
Back to top
Angus Logan [MVP]
Guest





Posted: Tue Jan 18, 2005 4:25 am    Post subject: Re: dynamically creating custom property definitions Reply with quote

Hi Nikolaj,

So the error is raised when the Template definition is checked out and being
worked on by another user?

I dont know if it is a very good practice to be checking in templates
automatically as some developers may be making changes to them at the time;
but here is how I think you could do it anyway.
---
Could you not check if the template definition is currently checked out;

if it is checked out; authenticate as an administrator(?) check the template
definition back in and do the modification?

if it is checked in: Just do the modification;

Then Commit the transaction.

Regards

--
________________________________________

Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________
"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:B8A61D2C-0801-4E69-B1AC-EC2C8C8D4227@microsoft.com...
Quote:
Yes.

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually the new custom property definition will be added to the template
and not to the posting.
There is no way to add it to the posting without modifying the template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role higher
than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in
the
console.
When the user clicks "save" values are stored in the newly created
custom
properties.

The only problem is that the method fails when a posting is locked
by
someone else. When creating the custom property definitions I get
an
exception with the text:
"Cannot modify object. The object is already checked out by another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj





Back to top
Nikolaj
Guest





Posted: Tue Jan 18, 2005 3:19 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Thanks for your answers. I'm still puzzled

- The changes are made to the template definition.
- The template definition is not checked out.
- The exception only occur when the posting is checked out to another user.




"Angus Logan [MVP]" wrote:

Quote:
Hi Nikolaj,

So the error is raised when the Template definition is checked out and being
worked on by another user?

I dont know if it is a very good practice to be checking in templates
automatically as some developers may be making changes to them at the time;
but here is how I think you could do it anyway.
---
Could you not check if the template definition is currently checked out;

if it is checked out; authenticate as an administrator(?) check the template
definition back in and do the modification?

if it is checked in: Just do the modification;

Then Commit the transaction.

Regards

--
________________________________________

Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________
"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:B8A61D2C-0801-4E69-B1AC-EC2C8C8D4227@microsoft.com...
Yes.

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually the new custom property definition will be added to the template
and not to the posting.
There is no way to add it to the posting without modifying the template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role higher
than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit in
the
console.
When the user clicks "save" values are stored in the newly created
custom
properties.

The only problem is that the method fails when a posting is locked
by
someone else. When creating the custom property definitions I get
an
exception with the text:
"Cannot modify object. The object is already checked out by another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have sort of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj








Back to top
Stefan [MSFT]
Guest





Posted: Tue Jan 18, 2005 5:15 pm    Post subject: Re: dynamically creating custom property definitions Reply with quote

Hi Nikolaj,

please post your complete code.

Thanks,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:64CF5CAC-650E-45DA-996B-75D2F3C80C97@microsoft.com...
Quote:
Thanks for your answers. I'm still puzzled

- The changes are made to the template definition.
- The template definition is not checked out.
- The exception only occur when the posting is checked out to another
user.




"Angus Logan [MVP]" wrote:

Hi Nikolaj,

So the error is raised when the Template definition is checked out and
being
worked on by another user?

I dont know if it is a very good practice to be checking in templates
automatically as some developers may be making changes to them at the
time;
but here is how I think you could do it anyway.
---
Could you not check if the template definition is currently checked out;

if it is checked out; authenticate as an administrator(?) check the
template
definition back in and do the modification?

if it is checked in: Just do the modification;

Then Commit the transaction.

Regards

--
________________________________________

Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________
"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:B8A61D2C-0801-4E69-B1AC-EC2C8C8D4227@microsoft.com...
Yes.

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually the new custom property definition will be added to the
template
and not to the posting.
There is no way to add it to the posting without modifying the
template
definition.
Is this what you are doing?

Cheers,
Stefan.


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30C348C0-9D35-428B-81B8-84AF8353C819@microsoft.com...
It is creating the new custom property definitions that causes the
exception.
Not modifying existing Custom Properties.
The user is administrator. (Unless I'm doing something else wrong).

"Stefan [MSFT]" wrote:

Hi Nikolaj,

actually if you modify the custom property with a user role
higher
than
author this will work without any problems.
Only authors are locked against each others access.

Maybe this is a solution?

Authors cannot release the ownership of an item that is locked by
someone
else - so this would not be a solution anyway.

Cheers,
Stefan.

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:AA7E4D35-3744-4A33-9404-9C893CF64DA3@microsoft.com...
I have implemented a way to create custom property definitions
dynamically.
The prperty definitions are created when the user clicks edit
in
the
console.
When the user clicks "save" values are stored in the newly
created
custom
properties.

The only problem is that the method fails when a posting is
locked
by
someone else. When creating the custom property definitions I
get
an
exception with the text:
"Cannot modify object. The object is already checked out by
another
user
on
another server."

I have experimented a bit with ReleaseOwnership, but I have
sort of
lost
the
big picture about wat's safe an correct to do.

Any suggestions?

Nikolaj








Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB