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;
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
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
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/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
);
);
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
30819
30819
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