Git Product home page Git Product logo

Comments (8)

mike4aday avatar mike4aday commented on June 26, 2024

Hi @perbrondum not sure I understand your objection. myRecords is meant to be a convenience method: callers don't have to know the logged-in user's ID, and the OwnerId field is present on most objects. If myRecords were to be called with a type that doesn't have an OwnerId field, the publisher will fail with an error. In such cases, it's always possible to write a custom SOQL query for a particular object using the query method instead.

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 26, 2024

@perbrondum I'll add a note to the documentation so it's more explicit that the type argument has to be for an SObject type that does have the ownerId field.

from swiftlysalesforce.

perbrondum avatar perbrondum commented on June 26, 2024

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 26, 2024

@perbrondum Cases and Accounts, for example, are routinely reassigned after creation and then would have CreatedById != OwnerId no?

from swiftlysalesforce.

perbrondum avatar perbrondum commented on June 26, 2024

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 26, 2024

@perbrondum I don't understand - if I'm interested in querying records I own, e.g. cases or accounts for which I'm responsible, and regardless of who or what process originally created the records, then querying for records where my user ID equals the records' CreatedById wouldn't work, no?

from swiftlysalesforce.

perbrondum avatar perbrondum commented on June 26, 2024

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 26, 2024

@perbrondum thanks. I added a note to the documentation that the method is for types with OwnerId field and reference to docs.

from swiftlysalesforce.

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.