Setting record ownership in script

Setting record ownership in script

I have a setup with Account and Account_Transaction. A portal user creates the Account records when they initially sign up, so the ownership of that record is correctly assigned to the portal user. Account_Transaction entries are created via a script that is triggered by a different role, and will create transactions in multiple accounts, owned by multiple users that are different than the user that triggers the script. Users are only allowed to see transactions in their own account. The report filter does not allow me to traverse the parent relationship to the account and filter on Account.Added_User, and I am not allowed to set the Added_User field to anything other than zoho.loginuser or zoho.adminuser, so I have resorted to adding a proxy field that I need to manually set for any of the places I have a similar requirement, and use that in report filters.

This is, obviously not optimal. Among other things, it is a maintenance nightmare. Is there some way that I can properly assign the record ownership?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方