+ Start a Discussion
kiran punurukiran punuru 

how many no of roles does a single user may have

Hi,

Can someone tell me how many no of roles does a single user can have?

Thanks
Kiran
Best Answer chosen by kiran punuru
GauravGargGauravGarg
Hi Kiran,

Record level access are defined on Object level setting in Profile, i.e. which all Object related records need to be visible to User. 
Below are record level access:
Read: User can read only his records. 
Create: User can only create record on particular object.
Edit: For edit, we need to provide read access automatically. By Edit permission, user is able to update the record. 
Delete: User is able to delete record visible to him/her.
View All: User is able to view all the record of a particular object.
Modify All: User has Top Most permission, i.e. user is able to read, create, edit, delete any record on that object.

Please let me know, if you more assistance on this. Or you can contact me on: email; gauravgarg.nmims@gmail.com, skype: gaurav62990
Thanks,
Gaurav

All Answers

GauravGargGauravGarg
Hi Kiran,

Currently SFDC allows only one role to one user. 

Thanks,
Gaurav
kiran punurukiran punuru
Hi Gaurav,

Can you explain what record level access means exactly.

Thanks
kiran
GauravGargGauravGarg
Hi Kiran,

Record level access are defined on Object level setting in Profile, i.e. which all Object related records need to be visible to User. 
Below are record level access:
Read: User can read only his records. 
Create: User can only create record on particular object.
Edit: For edit, we need to provide read access automatically. By Edit permission, user is able to update the record. 
Delete: User is able to delete record visible to him/her.
View All: User is able to view all the record of a particular object.
Modify All: User has Top Most permission, i.e. user is able to read, create, edit, delete any record on that object.

Please let me know, if you more assistance on this. Or you can contact me on: email; gauravgarg.nmims@gmail.com, skype: gaurav62990
Thanks,
Gaurav
This was selected as the best answer
kiran punurukiran punuru
Hi Gaurav,
Thanks for your assistance i have one doubt related to documents upload in salesforce can you clarify it ?
 
GauravGargGauravGarg
Yes Kiran, please ask. 

Thanks,
Gaurav
kiran punurukiran punuru
Hi Gaurav,

I am basically need to send an email  along with uploaded file to a user when anyone of the user in the chatter group has uploaded a file .For that iam trying use content document link object from that object i am able to get the content document id .

But the problem is iam unable to get the body for the document .If i get the body for the document then i can add in attachment for that email.

Did have any other idea to solve this?

Thanks
kiran
GauravGargGauravGarg

Hi Kiran,

Through Chatter / FeedPost, files are uplaoded as attachments. Please look below code, this might helps you. 

 Set < String > attIds = new Set < String > ();
                    for (FeedItem em: [SELECT Body, HasContent, LinkUrl, Type, Visibility, RelatedRecordId FROM FeedItem where ParentId IN: ParentId]) {

                        if (em.Type == 'Content Post' || em.Type == 'ContentPost') {
                            attIds.add(em.RelatedRecordId);
                        }
                    }
                    System.debug('=====' + attIds);
                    if (attIds.size() > 0) {
                        for (ContentVersion conVer: [SELECT Title, VersionData, FileExtension FROM ContentVersion where Id IN: attIds]) {
                            Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
                            efa.setFileName(conVer.Title + '.' + conVer.FileExtension);
                            efa.setBody(conVer.VersionData);
                            fileAttachments.add(efa);
                        }

Thanks,

Gaurav

kiran punurukiran punuru
Hi Gaurav, 
I am using the below code:
Attachment ids are getting as blank.what is the error here?
trigger FeedItemTrigger on FeedItem (after insert,after update) {
   Set < String > attIds = new Set < String > ();
   Set <String> ParentId = new Set<String>();
    for(FeedItem fe :trigger.new){
        ParentId.add(fe.Id);
    }
    for (FeedItem em: [SELECT Body, HasContent, LinkUrl, Type, RelatedRecordId FROM FeedItem where ParentId IN: ParentId])
   {
        if (em.Type == 'Content Post' || em.Type == 'ContentPost') {
             attIds.add(em.RelatedRecordId);
           }
   }
     System.debug('=====' + attIds);
     if (attIds.size() > 0) {
         for (ContentVersion conVer: [SELECT Title, VersionData, FileExtension FROM ContentVersion where Id IN: attIds]) {
                Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
                efa.setFileName(conVer.Title + '.' + conVer.FileExtension);
                efa.setBody(conVer.VersionData);
                fileAttachments.add(efa);
         }
     }
}