Announcements
No record found.
I want to get blocked file extension and maximum file size for attachment set by admin in c# code .Below 2 images displays what I actually want using c# code.
Please suggest me answer.
*This post is locked for comments
Hello,
You can use following cdoe for that:
QueryExpression query = new QueryExpression("organization")
{
ColumnSet = new ColumnSet("blockedattachments", "maxuploadfilesize")
};
var record = service.RetrieveMultiple(query).Entities.FirstOrDefault();
var blockedAttachments = record.GetAttributeValue<string>("blockedattachments");
var maxAttachmentSize = record.GetAttributeValue<int>("maxuploadfilesize");
Thanks.It works.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
JS-09031509-0 3
AS-17030037-0 2
Mark Eckert 2