Changing App Scope Within A Script

amol_joshi
Tera Contributor

I currently have a scoped application that I built. The script include for this app is also under the same application scope. During its execution, the script include tries to talk to one of the tables in the Global scope and tries to perform a delete action on this table. Due to cross scope restrictions, the delete operation fails.

I want to change the app scope to Global, delete the record and go back to my original app scope.

I want to achieve this in the script itself and not modify any OOTB access controls on the table or create a cross scope record.

Can this be done? Thanks

1 ACCEPTED SOLUTION

To my knowledge, I can say giving cross scope access to delete / creating a script include in global scope are the best approach.

else you can try this, but this is not recommended. You can try to create a flag on the table where you want to delete the record, create a business rule to delete when the flag is true and from the script include update the flag.

View solution in original post

5 REPLIES 5

Neeraj_27
Tera Guru

Hi @amol_joshi,

Create the script include in global scope, write the action to delete and call this script include from custom application.

My supervisor has told me to keep the script include in the app scope. Otherwise your suggested solution was my preferred way as well. Is there any other way in script this could be done? Thanks

To my knowledge, I can say giving cross scope access to delete / creating a script include in global scope are the best approach.

else you can try this, but this is not recommended. You can try to create a flag on the table where you want to delete the record, create a business rule to delete when the flag is true and from the script include update the flag.

That is a work around for sure. If no script can do this then this is an efficient way I guess.