System.runAs for CspLitePortal Profile Users recently started returning no rowsHow to set the externalSharingModel for managed package objects using automation?Sharing with all the users of a profileGive High Volume Customer Portal User access to their own Contact RecordsStandard Profile for communityDoes “with sharing” only apply to 1st entry point of code?Why are users other than admin profile not able to access object data?Security Question for Customer Portal Profile UsersURL redirection to a specific Profile UsersManage permissions on chatter files from apexList has no rows while executed by system.runas()Cases created for portal users before their user is created are not shared with the portal user in unit tests

Print "N NE E SE S SW W NW"

Does this Spirit Guardians + Thorn Whip combo work?

In The Incredibles 2, why does Screenslaver's name use a pun on something that doesn't exist in the 1950s pastiche?

Purpose of cylindrical attachments on Power Transmission towers

Would a bit of grease on overhead door cables or bearings cause the springs to break?

Why is it bad to use your whole foot in rock climbing

Why is C++ template use not recommended in space/radiated environment?

Why is my Taiyaki (Cake that looks like a fish) too hard and dry?

Is there a term for someone whose preferred policies are a mix of Left and Right?

The best in flight meal option for those suffering from reflux

A flower's head or heart?

Can I get a photo of an Ancient Arrow?

Nth term of Van Eck Sequence

Customize Smartdiagram

Is it possible to install Firefox on Ubuntu with no desktop enviroment?

Short story about psychologist analyzing demon

Placement of positioning lights on A320 winglets

What are the advantages of using TLRs to rangefinders?

Is there a term for when fiction refers to fiction

ISP is not hashing the password I log in with online. Should I take any action?

Can Dive Down protect a creature against Pacifism?

What did the 8086 (and 8088) do upon encountering an illegal instruction?

Does WiFi affect the quality of images downloaded from the internet?

Harley Davidson clattering noise from engine, backfire and failure to start



System.runAs for CspLitePortal Profile Users recently started returning no rows


How to set the externalSharingModel for managed package objects using automation?Sharing with all the users of a profileGive High Volume Customer Portal User access to their own Contact RecordsStandard Profile for communityDoes “with sharing” only apply to 1st entry point of code?Why are users other than admin profile not able to access object data?Security Question for Customer Portal Profile UsersURL redirection to a specific Profile UsersManage permissions on chatter files from apexList has no rows while executed by system.runas()Cases created for portal users before their user is created are not shared with the portal user in unit tests






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















We have some tests that use System.runAs for a User created like this:



 Contact c = ...;

Profile p = [
select Id
from Profile
where UserType = 'CspLitePortal'
limit 1
];
insert u = new User(
ProfileId = p.id,
ContactId = c.id,
...
);


and they have started failing in the last 2 weeks. Seems like a sharing problem, where the test - running as a SA User - inserts rows, but the System.runAs User can't see them for custom objects and objects like Attachment.



Anyone else having this problem? Summer '19? Or a side effect of Multi-Instance Core and Communities Service Disruption starting May 17, 2019? Workarounds?



PS



Changing with sharing to without sharing eliminates the problem but is not a change that makes sense for production use.










share|improve this question
























  • Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

    – Jeferson Chaves
    May 29 at 12:57











  • Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

    – Keith C
    May 29 at 12:57












  • Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

    – Keith C
    May 29 at 13:12

















2















We have some tests that use System.runAs for a User created like this:



 Contact c = ...;

Profile p = [
select Id
from Profile
where UserType = 'CspLitePortal'
limit 1
];
insert u = new User(
ProfileId = p.id,
ContactId = c.id,
...
);


and they have started failing in the last 2 weeks. Seems like a sharing problem, where the test - running as a SA User - inserts rows, but the System.runAs User can't see them for custom objects and objects like Attachment.



Anyone else having this problem? Summer '19? Or a side effect of Multi-Instance Core and Communities Service Disruption starting May 17, 2019? Workarounds?



PS



Changing with sharing to without sharing eliminates the problem but is not a change that makes sense for production use.










share|improve this question
























  • Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

    – Jeferson Chaves
    May 29 at 12:57











  • Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

    – Keith C
    May 29 at 12:57












  • Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

    – Keith C
    May 29 at 13:12













2












2








2








We have some tests that use System.runAs for a User created like this:



 Contact c = ...;

Profile p = [
select Id
from Profile
where UserType = 'CspLitePortal'
limit 1
];
insert u = new User(
ProfileId = p.id,
ContactId = c.id,
...
);


and they have started failing in the last 2 weeks. Seems like a sharing problem, where the test - running as a SA User - inserts rows, but the System.runAs User can't see them for custom objects and objects like Attachment.



Anyone else having this problem? Summer '19? Or a side effect of Multi-Instance Core and Communities Service Disruption starting May 17, 2019? Workarounds?



PS



Changing with sharing to without sharing eliminates the problem but is not a change that makes sense for production use.










share|improve this question
















We have some tests that use System.runAs for a User created like this:



 Contact c = ...;

Profile p = [
select Id
from Profile
where UserType = 'CspLitePortal'
limit 1
];
insert u = new User(
ProfileId = p.id,
ContactId = c.id,
...
);


and they have started failing in the last 2 weeks. Seems like a sharing problem, where the test - running as a SA User - inserts rows, but the System.runAs User can't see them for custom objects and objects like Attachment.



Anyone else having this problem? Summer '19? Or a side effect of Multi-Instance Core and Communities Service Disruption starting May 17, 2019? Workarounds?



PS



Changing with sharing to without sharing eliminates the problem but is not a change that makes sense for production use.







unit-test community sharing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 29 at 12:33







Keith C

















asked May 29 at 11:39









Keith CKeith C

98.6k11100232




98.6k11100232












  • Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

    – Jeferson Chaves
    May 29 at 12:57











  • Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

    – Keith C
    May 29 at 12:57












  • Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

    – Keith C
    May 29 at 13:12

















  • Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

    – Jeferson Chaves
    May 29 at 12:57











  • Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

    – Keith C
    May 29 at 12:57












  • Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

    – Keith C
    May 29 at 13:12
















Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

– Jeferson Chaves
May 29 at 12:57





Well, maybe this is somewhat related to Summer'19 changes regarding OWD External Org-Wide Defaults in Orgs with Communities & Custom Object Access Settings Default to Private.

– Jeferson Chaves
May 29 at 12:57













Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

– Keith C
May 29 at 12:57






Hi @JefersonChaves, Looks likely: in a newly created scratch org all the custom objects have "Default External Access" as "private". Changing that now.

– Keith C
May 29 at 12:57














Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

– Keith C
May 29 at 13:12





Yep @JefersonChaves that's it. Please post that as the answer and I will accept!

– Keith C
May 29 at 13:12










1 Answer
1






active

oldest

votes


















4














This is related to Summer'19 changes:



  • OWD External Org-Wide Defaults in Orgs with Communities

  • Custom Object Access Settings Default to Private





share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "459"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f264064%2fsystem-runas-for-cspliteportal-profile-users-recently-started-returning-no-rows%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    This is related to Summer'19 changes:



    • OWD External Org-Wide Defaults in Orgs with Communities

    • Custom Object Access Settings Default to Private





    share|improve this answer



























      4














      This is related to Summer'19 changes:



      • OWD External Org-Wide Defaults in Orgs with Communities

      • Custom Object Access Settings Default to Private





      share|improve this answer

























        4












        4








        4







        This is related to Summer'19 changes:



        • OWD External Org-Wide Defaults in Orgs with Communities

        • Custom Object Access Settings Default to Private





        share|improve this answer













        This is related to Summer'19 changes:



        • OWD External Org-Wide Defaults in Orgs with Communities

        • Custom Object Access Settings Default to Private






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 29 at 13:21









        Jeferson ChavesJeferson Chaves

        30819




        30819



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Salesforce Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f264064%2fsystem-runas-for-cspliteportal-profile-users-recently-started-returning-no-rows%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?