Code Monkey home page Code Monkey logo

Comments (8)

tmowbrey avatar tmowbrey commented on August 14, 2024

You may want to view the recently updated fflib_SobjectSelector (pull 91 - #91).

RecordType.SObjectType.getDescribe().getName() needs to be updated to RecordType.getSObjectType().getDescribe().getName() and may be the source of your issue.

from fflib-apex-common.

tfuda avatar tfuda commented on August 14, 2024

Thank you. I will merge in the pull request and create a package and try it. There's no other way to verify whether it addresses my post-install problem other than creating a new package. Please vote for this idea if you have a moment: https://success.salesforce.com/ideaView?id=08730000000DpREAA0. If it works, I will report back here. Might be a few days.

from fflib-apex-common.

afawcett avatar afawcett commented on August 14, 2024

@tfuda yep we've hit this recently as well, we have a case out with Salesforce on it, be interested actually if the recent change does resolve it, let us know. And yep testing post install problems is not great. I've just upvoted your idea and will tweet.

from fflib-apex-common.

tfuda avatar tfuda commented on August 14, 2024

Sadly, I created a package today that included the code change from pull request #91. Unfortunately, I am still getting the same failure from my InstallHandler code when the static initializer for the STANDARD_WITHOUT_CURRENCYISO set is initialized. So, I believe this is still problematic for InstallHandler classes that wish to utilize fflib_SObjectSelector.

from fflib-apex-common.

afawcett avatar afawcett commented on August 14, 2024

Ok, i'll see if i can get an update on the fix related to this issue.

from fflib-apex-common.

cb-chaitanya avatar cb-chaitanya commented on August 14, 2024

@tfuda We've recently included the enterprise patterns into our managed package.When we used fflib_SObjectSelector in a class which is called by post install class, we're receiving the following error even though the user is System Administrator DMLManager.CRUDException: Access Denied: OP_INSERT .Is it because of the with sharing keyword on fflib_SObjectSelector class and Is it recommended to use fflib_SObjectSelector in post install context?

from fflib-apex-common.

daveespo avatar daveespo commented on August 14, 2024

@cb-chaitanya -- a few things:

Lastly, be careful about any DML you do in an InstallHandler class. If you schedule Scheduled Apex or run Batch Apex, those async jobs will run as the ghost user and you'll find all sorts of strange permission problems that you have no way of troubleshooting since you can never impersonate that user. Plus, if you include the Last Modified By field for any records modified by the ghost user on a Report, the records will not appear because the running user will not have access to that ghost user's User record.

from fflib-apex-common.

cb-chaitanya avatar cb-chaitanya commented on August 14, 2024

@daveespo Thank you so much for your valuable information.We're planning to schedule a job on installation that does DML intense job.But for now we'll explore different options to schedule this.

from fflib-apex-common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.