This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Adding Private Permission question

Yelena - Thursday, November 1, 2012 10:13 AM:

Hello
I am trying to write a method to create a private permission for controlled item on workflow delegate. I used example from the developer manual and am getting syntax errors:
'setPrivatePermission' is not a member of 'Aras.IOM.Item'.
And the same for 'setIdentityAccess'
 
Here is part of the VB code executed on the workfow OnDelegate that gives an error.
 
'Getting delegated to identity
Dim myID As String = Me.getProperty("ToAssignmentId")
Dim Ident As Item = Me.NewItem("identity","get")
Ident.setID(myID)
Ident = Ident.apply()
'Get delegated to identity name
Dim delegate_name As String = Ident.getProperty("name")
'create private permission from existing one
Dim permItem As item = controlledItem.setPrivatePermission("RFQ In Process")
permItem.setProperty("name", permItem.getID())
'add permissions for delegate to user
permItem.setIdentityAccess(delegate_name, "get", True)
permItem.setIdentityAccess(delegate_name, "update", True)
controlledItem.setAction("edit")
Dim resultItem As item = controlledItem.apply()
If (resultItem.isError()) Then innovator.newerror(resultItem.getErrorDetail())
 
If you have any examples of the code I need or recommendations,  please help

Thanks for your help,
Yelena
 

 


RobMcAveney - Thursday, November 1, 2012 12:32 PM:

Hi Yelena -

Check the latest version of the Programmer's Guide.  The setPrivatePermission and setIdentityAccess methods were deprecated a while back, but there are other ways to accomplish the same things.

Regards -

Rob



Yelena - Thursday, November 1, 2012 2:59 PM:

Hi Rob,

 

Actually this is exactly were I got an example from  - 7.10 Add a Named Permission  and  7.11 Set a Private Permission for an Item

where setPrivatePermission and setIdentityAccess methods are used.

I need to write method that will create a new named permission as copy of existing item's permiossion and add "get" and "update" access for delegated identity. I am not sure where else in the Programmer's guide I can find the alternate solution. Would be great if you could point me to the cirrect section.

Thanks,

Yelena 



RobMcAveney - Thursday, November 1, 2012 3:28 PM:

Yelena -

Are you sure you are looking at the latest version of the Programmer's Guide?  These examples have changed in recent releases.  In the newest version there is no reference to setPrivatePermission.

Regards -

Rob



Yelena - Thursday, November 1, 2012 4:14 PM:

Rob,

I am pretty sure. Just checked again. The document on the aras web site (the one you gave me the link to) and on ftp site called "Aras Innovator 9.3 - Programmers Guide"  has examples in the section 7.10 and 7.11 using these methods. The sections are actually called " Set a Private permission" and "Add Named Permission"

If you have latest version or some examples how this can be done, I will greatly appreciate your help.

Thanks,

Yelena



RobMcAveney - Thursday, November 1, 2012 4:51 PM:

Hi Yelena -

My apologies, I was looking at a newer version than what is available on the web site.  Since you are a subscriber, you can download the latest version via FTP.  Look for the version under the 9.3.0 SP5 image.  Let me know if you have trouble finding it and I will email it to you directly.

Regards -

Rob



Yelena - Tuesday, November 6, 2012 3:17 PM:

Hi Rob,

 

I got it. thanks a lot

 

Yelena