Set Ownership Profile in Automation Code Snippet

Questions about and code samples for automation process code snippets within Select.
Post Reply
mwalsh
Posts: 10
Joined: Wed Apr 15, 2015 8:49 am

Set Ownership Profile in Automation Code Snippet

Post by mwalsh »

Softpro,

I'm looking to use automation to set the ownership profile in some specific cases, but don't know the exact syntax to do so. I tried the below logic, but received a "Error: can't assign to read-only property OwnershipProfileID of type 'Order'" error. Can you please let me know the exact syntax? Thank you...


from System import *
from SoftPro.ClientModel import *
from SoftPro.Select.Client import *

#
# Place your snippet here.
# You can refer to the current context object using the global variable Context.
#
# Ex: Context.Project = 'SoftPro Rocks!'


Context.OwnershipProfileID = '9DAAAA44-A540-E311-BC56-E006E6B4F88F'
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Set Ownership Profile in Automation Code Snippet

Post by BobRichards »

This cannot be done.

After writing a script to get the new IProfileInfo object and set the OwnershipProfile, I ran into errors when the automation process ran. After consulting with the automation team, we determined that Automation Processes cannot set this property. This is because the user id assigned to automation does not have any profiles assigned to it. Also, you cannot access the user id from SPAdmin to change it.

For now, there is no work-around but the automation team is aware of the issue.

Sorry.
Bob Richards, Senior Software Developer, SoftPro
Post Reply