We’re using Attachments on a Custom Object whereby Partner Community Users need read only access to Attachments posted by an Employee User but edit access to the Attachments they have posted. It would stand to reason that the most straight-forward approach would be to use a filter on a model condition on the Attachment model for Owner.UserType. However, this throws a pretty nasty error:
1. An error occurred while attempting to perform the following SOQL query: SELECT ContentType,CreatedDate,CreatedById,CreatedBy.Name,OwnerId,Owner.Name,ParentId,Parent.Name,LastModifiedDate,LastModifiedById,LastModifiedBy.Name,Name,Description,BodyLength,Owner.UserType,Id FROM Attachment LIMIT 21 Error:No such column ‘UserType’ on entity ‘Name’. If you are attempting to use a custom field, be sure to append the ‘__c’ after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
I have been able to bring in a User Model and filter on UserType IN (‘CSPLitePortal’,‘PowerPartner’) and then place a condition to merge the models on the Attachment Model.
I’m a bit worried about this as we’ll ultimately have 70,000 portal (er, I mean “community”) users. Seems like a setup for major performance issues. For this same reason, a subquery is also not something I’d want to consider.
I have created a formula field using IsPickVal against UserType on the User object. Works in standard SFDC but produces the same “LIMIT 21” error in Skuid.
Now that I’ve bored you with the fun facts, please let me know what successes you might have encountered when dealing with accessing UserType from the Owner reference in Attachment.
Question
Determine the Attachment Owner User Type
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

