Page 1 of 1

Set Ownership Profile in Automation Code Snippet

Posted: Fri Jun 16, 2017 11:02 am
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'

Re: Set Ownership Profile in Automation Code Snippet

Posted: Fri Jul 14, 2017 10:47 am
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.