Symptom
- The "SizeInkB" field is inconsistently available in the AttachmentFolderCollection of different Business Objects (BOs) in the OData API.
- Some BOs, such as SalesQuoteAttachmentFolderCollection and SurveyAttachmentsCollection, provide the "SizeInkB" field, while others, such as OpportunityAttachmentFolderCollection and LeadAttachmentFolderCollection, do not.
Environment
- SAP Cloud for Customer
- OData API
Reproducing the Issue
- Query the AttachmentFolderCollection of different Business Objects (e.g., Quote, Task, Opportunity, Order, Lead) using the OData API.
- Observe that the "SizeInkB" field is available for some BOs but missing for others.
Cause
- Each Business Object (BO) has its own development team and logic, leading to variations in the fields available in their respective AttachmentFolderCollections.
- The "SizeInkB" field is not uniformly implemented across all BOs.
Resolution
(1) As a workaround, calculate the size of attachments using the "Binary" property:
- Decode the "Binary" property, which is in base64 format.
- Calculate the size of the decoded binary data.
(2) Refer to the respective documentation for each BO to understand its supported fields:
- SalesQuoteAttachmentFolderCollection: Refer to SalesQuoteAttachmentFolder Documentation.
- OpportunityAttachmentFolderCollection: Refer to OpportunityAttachmentFolder Documentation.
- LeadAttachmentFolderCollection: Refer to LeadAttachmentFolder Documentation.
(3) Submit a feature request for standardizing the "SizeInkB" field across all BOs via the Customer Influence portal: Customer Influence Portal.
See Also
- Refer to SalesQuoteAttachmentFolder Documentation.
- Refer to OpportunityAttachmentFolder Documentation.
- Refer to LeadAttachmentFolder Documentation.
Keywords
OData, AttachmentFolderCollection, SizeInkB, Business Objects, SalesQuoteAttachmentFolderCollection, OpportunityAttachmentFolderCollection, LeadAttachmentFolderCollection , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Bug Filed
Product
SAP Cloud for Customer core applications all versions