Trouble creating record in sn_cd_content_visibility via record producer

David Lundy
Tera Contributor

Hello all!

 

We're developing a web portal where we want to show "Upcoming Events".  We're using a record producer to allow the users to create these events.  The event record is created in the sn_cd_content_portal table by the RP.  We also want to have the event automatically scheduled when it is created.  Herein lies my problem.

 

I added a flag variable to the RP which is true when an event is created via the RP.  I then have a Flow which looks for new records with the flag set before executing.  The Flow then creates a record in the sn_cd_content_visibility table and provides the necessary field information to schedule the event to show.

 

Unfortunately, when testing the Flow, I get the error "Scope does not have create access to table sn_cd_content_visibility".

 

DavidLundy_0-1734555721287.png

I have created a cross-scope privilege record in sys_scope_privilege which grants Create access Allowed to the scope where the RP exists.  Obviously, this hasn't helped.

DavidLundy_1-1734555746052.png

 

I've also enabled read/write/create permissions on the sn_cd_content_visibility table itself.  Also, to no avail.

 

Does anyone have any suggestions for how I can get the Flow to be able to create a record on the table?  I was going to try using a Business Rule, but I'm afraid I'll just run into the cross-scope access issue again.

 

Thanks for any assistance.

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@David Lundy Instead of creating the cross scope privilege record in Employee Center Addons, please try creating it in the Target scope Content Publishing. This should ideally address your cross scope access issue.

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @David Lundy ,

The issue arises because your Flow does not have the required permissions to create records in the sn_cd_content_visibility table. To resolve this, you first need to check and update the Access Control List (ACL) for the table. Navigate to System Security > Access Control (ACL), search for the sn_cd_content_visibility table, and ensure that the create rule allows the Flow's scope to insert records. If no suitable rule exists, you can modify or add one to grant the necessary access.

Additionally, go to System Definition > Tables, search for the sn_cd_content_visibility table, and review its Application Access settings. Ensure that options like Allow access to this table via web services and Allow configuration are enabled. Add the Flow’s application scope to the Can Create list.

If updating permissions doesn’t resolve the problem, you can use a Script Action within the Flow. This bypasses scope restrictions by using server-side scripting to insert the required record into the sn_cd_content_visibility table. The script initializes a GlideRecord object, sets the necessary fields, and inserts the record.

After making these changes, re-test the Flow to ensure the event is scheduled correctly without any errors. Be cautious when modifying ACLs or table access to avoid unintended security risks. If the Flow is part of a Scoped Application, ensure the application roles have the correct permissions as well.

Hi Tejas, thanks for your suggestions!

 

I've seen references to this before, but in my client, I don't see any way to designate an ACL for a specific scope.  Fields and roles, yes.  But not a specific scope.  I also can't see an option to add an application to the "Can Create list".  In my client, Can Create is simply a checkbox; no list.

 

I think I may have to go with @Sandeep Rajput and just recreate the Flow within the Content Publishing scope.  I had hoped to keep everything in the scoped application but it should be fine.

Sandeep Rajput
Tera Patron
Tera Patron

@David Lundy Instead of creating the cross scope privilege record in Employee Center Addons, please try creating it in the Target scope Content Publishing. This should ideally address your cross scope access issue.