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

Create Report Subscription script

Hello, 

I need to create the report subscriptions from script/process. 

I have a number of reports that are bundled as a standard package. All of them should be assigned to users automatically.
User can opt out from those subscriptions at any time. 

Is there any way to do this from script/process?

I've tried inserting records using object browser manually, the insert action is prevented (permission missing). 

If there is no out-of-the-box method, what records (in which tables) I should insert to create subscription manually?

 

Thanks, 
Piotr Markiewicz

Parents
  • Hi Piotr,

    Yes, there is an insert that takes place in IT Shop and you can see this in the SQL log for the web portal, if it's enabled, e.g.:

    insert into DialogProcess (GenProcID, BasisObjectType, ObjectKey, ProcessState, DisplayName, XDateInserted, XDateUpdated, XUserInserted, XUserUpdated)

     select '7b8eb2b9-428e-4e8d-b30f-16669a47037d', 'RPSSubscription', '<Key><T>RPSSubscription</T><P>f7a2e9a2-97b4-4f9c-9551-1b7506306142</P></Key>', 'G', N'Insert - Account Access', GetUTCDate(), GetUTCDate(), N'TREVORP', N'TREVORP'  

      where not exists (select 1 from dialogprocess where GenProcID = '7b8eb2b9-428e-4e8d-b30f-16669a47037d')

    But there are very specific permissions on this table, and you'll get a better overview of this in Designer:

     

    So you would need to assign a permissions group that would allow for an insert.  But I suggest to be very careful with this.

    Trevor

Reply
  • Hi Piotr,

    Yes, there is an insert that takes place in IT Shop and you can see this in the SQL log for the web portal, if it's enabled, e.g.:

    insert into DialogProcess (GenProcID, BasisObjectType, ObjectKey, ProcessState, DisplayName, XDateInserted, XDateUpdated, XUserInserted, XUserUpdated)

     select '7b8eb2b9-428e-4e8d-b30f-16669a47037d', 'RPSSubscription', '<Key><T>RPSSubscription</T><P>f7a2e9a2-97b4-4f9c-9551-1b7506306142</P></Key>', 'G', N'Insert - Account Access', GetUTCDate(), GetUTCDate(), N'TREVORP', N'TREVORP'  

      where not exists (select 1 from dialogprocess where GenProcID = '7b8eb2b9-428e-4e8d-b30f-16669a47037d')

    But there are very specific permissions on this table, and you'll get a better overview of this in Designer:

     

    So you would need to assign a permissions group that would allow for an insert.  But I suggest to be very careful with this.

    Trevor

Children
No Data