CreateOrganizationService method an IOrganizationService instance for the organization that the specified user is a member of.
it takes one parameter as the userId and the details of the parameter and value are as below...
1. if we pass a null value, then it will consider as the System User.
Ex: CreateOrganizationService(null)
2. if we pass an empty GUID, then this will consider the current user's GUID
Ex: CreateOrganizationService(Guid.Empty)
Many developers, donot use this trick, they try to get the GUID and then pass here as below.
CreateOrganizationService(context.UserId)
3. for specific user, pass the guid of that user
CreateOrganizationService(new Guid("xxxxx.xxxxx.xxxx"));
regards,
Yes.Sudhanshu
it takes one parameter as the userId and the details of the parameter and value are as below...
1. if we pass a null value, then it will consider as the System User.
Ex: CreateOrganizationService(null)
2. if we pass an empty GUID, then this will consider the current user's GUID
Ex: CreateOrganizationService(Guid.Empty)
Many developers, donot use this trick, they try to get the GUID and then pass here as below.
CreateOrganizationService(context.UserId)
3. for specific user, pass the guid of that user
CreateOrganizationService(new Guid("xxxxx.xxxxx.xxxx"));
regards,
Yes.Sudhanshu
Thanks for the list.
ReplyDeleteHome security twin cities
Nice blog by obat gatal di daerah kewanitaan as an addition to knowledge
ReplyDelete