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?Sharing File attached to an Account in CommunityWhy are users other than admin profile not able to access object data?Security Question for Customer Portal Profile UsersManage permissions on chatter files from apexList has no rows while executed by system.runas()
What is an idiom, phrase or expression for situation such as "throw a pigeon among cats"
How to play a devious character when you are not personally devious?
Fiducial placement
How are astronauts in the ISS protected from electric shock?
Why do the Romance languages use definite articles, when Latin doesn't?
Employer says they want Quality & Quantity, but only pays bonuses based on the latter
Do players roll their own die?
Can someone interview their sibling?
How to delete music as it's being played
At what point can you walk out of a restaurant if they make you wait to pay the bill?
How do journals gain and lose reputation?
How do I get softer pictures in sunlight, like in this commercial?
Determining number of unique hydrogens in lactupicrinal 1H NMR
Program to print the multiple occurrence of numbers in a list
Why does hairspray work as an adhesive for ABS?
Make a haystack (with a needle)
How are hillsides farmed?
instead of pressurizing an entire spacesuit with oxygen could oxygen just pressurize the head and the rest of the body be pressurized with water?
Conveying "What does it mean?" ("signifie" et "veut dire")
Logical all/any in bash
Length-terminated sequences
How do I search for a package?
Is it safe to plug one travel adapter into another?
What is the difference between democracy and ochlocracy?
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?Sharing File attached to an Account in CommunityWhy are users other than admin profile not able to access object data?Security Question for Customer Portal Profile UsersManage permissions on chatter files from apexList has no rows while executed by system.runas()
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
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
add a comment
|
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
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
add a comment
|
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
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
unit-test community sharing
edited May 29 at 12:33
Keith C
asked May 29 at 11:39
Keith CKeith C
102k14 gold badges106 silver badges246 bronze badges
102k14 gold badges106 silver badges246 bronze badges
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
add a comment
|
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
add a comment
|
1 Answer
1
active
oldest
votes
This is related to Summer'19 changes:
- OWD External Org-Wide Defaults in Orgs with Communities
- Custom Object Access Settings Default to Private
add a comment
|
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/4.0/"u003ecc by-sa 4.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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
This is related to Summer'19 changes:
- OWD External Org-Wide Defaults in Orgs with Communities
- Custom Object Access Settings Default to Private
add a comment
|
This is related to Summer'19 changes:
- OWD External Org-Wide Defaults in Orgs with Communities
- Custom Object Access Settings Default to Private
add a comment
|
This is related to Summer'19 changes:
- OWD External Org-Wide Defaults in Orgs with Communities
- Custom Object Access Settings Default to Private
This is related to Summer'19 changes:
- OWD External Org-Wide Defaults in Orgs with Communities
- Custom Object Access Settings Default to Private
answered May 29 at 13:21
Jeferson ChavesJeferson Chaves
3301 silver badge11 bronze badges
3301 silver badge11 bronze badges
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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