afv-library/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Attachment.json

170 lines
11 KiB
JSON
Raw Normal View History

{
"sections": [
"title",
"description",
"fields",
"usage",
"wsdl_segment",
"field_reference"
],
"title": "Attachment - Data API",
"description": "Represents a file that a User has uploaded and attached to a parent object.",
"fields_columns": [
"type",
"properties",
"description",
"relationship_name",
"relationship_type",
"refers_to"
],
"fields": {
"Body": {
"type": "base64",
"properties": "Create, Update",
"description": "Encoded file data.",
"required": true
},
"BodyLength": {
"type": "int",
"properties": "Filter, Group, Nillable, Sort",
"description": "Size of the file (in bytes)."
},
"ConnectionReceivedId": {
"type": "reference",
"properties": "Filter, Group, Nillable, Sort",
"description": "ID of the PartnerNetworkConnection that shared this record with your organization. This field is available if you enabled Salesforce to Salesforce."
},
"ConnectionSentId": {
"type": "reference",
"properties": "Filter, Group, Nillable, Sort",
"description": "ID of the PartnerNetworkConnection that you shared this record with. This field is available if you enabled Salesforce to Salesforce. This field is supported using API versions earlier than 15.0. In all other API versions, this fields value is null. You can use the new PartnerNetworkRecordConnection object to forward records to connections."
},
"ContentType": {
"type": "string",
"properties": "Create, Filter, Group, Nillable, Sort, Update",
"description": "The content type of the attachment.If the Don't allow HTML uploads as attachments or document records security setting is enabled for your organization, you cannot upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg. When you insert a document or attachment through the API, make sure that this field is set to the appropriate MIME type."
},
"Description": {
"type": "textarea",
"properties": "Create, Filter, Nillable, Sort, Update",
"description": "Description of the attachment. Maximum size is 500 characters. This field is available in API version 18.0 and later."
},
"IsEncrypted": {
"type": "boolean",
"properties": "Defaulted on create, Filter, Group, Sort",
"description": "Indicates whether the attachment is encrypted using Shield Platform Encryption (true) or not (false). This field is available in API version 34.0 and later."
},
"IsPartnerShared": {
"type": "boolean",
"properties": "Defaulted on create, Filter, Group, Sort, Update",
"description": "Indicates whether this record is shared with a connection using Salesforce to Salesforce. Label is Is Shared With Partner."
},
"IsPrivate": {
"type": "boolean",
"properties": "Create, Defaulted on create, Filter, Group, Sort, Update",
"description": "Indicates whether this record is viewable only by the owner and administrators (true) or viewable by all otherwise-allowed users (false). During a create or update call, it is possible to mark an Attachment record as private even if you are not the owner. This can result in a situation in which you can no longer access the record that you just inserted or updated. Label is Private.Attachments on tasks or events can't be marked private."
},
"Name": {
"type": "string",
"properties": "Create, Filter, Group, idLookup, Sort, Update",
"description": "Name of the attached file. Maximum size is 255 characters. Label is File Name.",
"required": true
},
"OwnerId": {
"type": "reference",
"properties": "Create, Defaulted on create, Filter, Group, Sort, Update",
"description": "ID of the User who owns the attachment. This field isnt required for API version 9.0 or later. The owner of an attachment on a task or event must be the same as the owner of the task or event. This is a polymorphic relationship field.",
"relationship_name": "Owner",
"relationship_type": "Lookup",
"refers_to": "Calendar, User"
},
"ParentId": {
"type": "reference",
"properties": "Create, Filter, Group, Sort",
"description": "ID of the parent object of the attachment. The following objects are supported as parents of attachments: Account Asset Campaign Case Contact Contract Custom objects EmailMessage EmailTemplate Event Lead Opportunity Product2 Solution Task This is a polymorphic relationship field.",
"relationship_name": "Parent",
"relationship_type": "Lookup",
"refers_to": "Account, Accreditation, AssessmentIndicatorDefinition, AssessmentTask, AssessmentTaskContentDocument, AssessmentTaskDefinition, AssessmentTaskOrder, Asset, Award, BoardCertification, BusinessLicense, BusinessMilestone, BusinessProfile, Campaign, CareBarrier, CareBarrierDeterminant, CareBarrierType, CareDeterminant, CareDeterminantType, CareDiagnosis, CareMetricTarget, CareObservationComponent, CarePgmProvHealthcareProvider, CareProgram, CareProgramCampaign, CareProgramEligibilityRule, CareProgramEnrollee, CareProgramEnrolleeProduct, CareProgramEnrollmentCard, CareProgramGoal, CareProgramProduct, CareProgramProvider, CareProgramTeamMember, CareProviderAdverseAction, CareProviderFacilitySpecialty, CareRegisteredDevice, CareRequest, CareRequestDrug, CareRequestExtension, CareRequestItem, CareSpecialty, CareTaxonomy, Case, CommSubscription, CommSubscriptionChannelType, CommSubscriptionConsent, CommSubscriptionTiming, Contact, Contract, CreditMemo, DelegatedAccount, EmailMessage, EmailTemplate, EngagementChannelType, EnrollmentEligibilityCriteria, Event, HealthcareFacility, HealthcareFacilityNetwork, HealthcarePayerNetwork, HealthcarePractitionerFacility, HealthcareProvider, HealthcareProviderNpi, HealthcareProviderSpecialty, HealthcareProviderTaxonomy, IdentityDocument, Image, IndividualApplication, Invoice, Lead, Location, MemberPlan, Opportunity, Order, OtherComponentTask, PersonEducation, PersonLifeEvent, Product2, ProductRequest, ProductRequestLineItem, PurchaserPlan, ReceivedDocument, ServiceAppointment, ServiceResource, Shift, SocialPost, Solution, Task, Visit, VisitedParty, Visitor, VolunteerProject, WorkOrder, WorkOrderLineItem",
"required": true
}
},
"usage": "The API sends and receives the binary file attachment data encoded as a base64Binary data type. Before creating a record, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary (this conversion is usually handled for you by the SOAP client). The create call restricts these files to a maximum size of 25 MB. For a file attached to a Solution, the limit is 1.5 MB. The maximum email attachment size is 3 MB. The API supports attachments on email in create, delete, or update calls. The query call does not return attachments parented by email, unless the user performing the query has the “Modify All Data” permission. Access to fields depends on the method being used:\n\nThe API sends and receives the binary file attachment data encoded as a base64Binary data type. Before creating a record, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary (this conversion is usually handled for you by the SOAP client).\n\nThe create call restricts these files to a maximum size of 25 MB. For a file attached to a Solution, the limit is 1.5 MB. The maximum email attachment size is 3 MB.\n\nThe API supports attachments on email in create, delete, or update calls. The query call does not return attachments parented by email, unless the user performing the query has the “Modify All Data” permission.\n\nAccess to fields depends on the method being used:",
"wsdl_segment": "```xml\n<complexType name=\"Attachment\">\n <complexContent>\n <extension base=\"ens:sObject\">\n <sequence>\n <element name=\"Body\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:base64Binary\"/>\n <element name=\"BodyLength\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:int\"/>\n <element name=\"ContentType\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"CreatedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:sObject\"/>\n <element name=\"CreatedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"CreatedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Description\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"IsDeleted\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"IsPrivate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"LastModifiedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:sObject\"/>\n <element name=\"LastModifiedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"LastModifiedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Name\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"Owner\" nillable=\"true\" minOccurs=\"0\" type=\"ens:sObject\"/>\n <element name=\"OwnerId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"Parent\" nillable=\"true\" minOccurs=\"0\" type=\"ens:sObject\"/>\n <element name=\"ParentId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"SystemModstamp\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n </sequence>\n </extension>\n </complexContent>\n</complexType>\n<simpleType name=\"ID\">\n <restriction base=\"xsd:string\">\n <length value=\"18\"/>\n <pattern value=\"[a-zA-Z0-9]{18}\"/>\n </restriction>\n</simpleType>\n```",
"field_reference": {
"Body": {
"field_label": "Body",
"type": "base64"
},
"BodyLength": {
"field_label": "Body Length",
"type": "int",
"digits": "8"
},
"ContentType": {
"field_label": "Content Type",
"type": "string",
"length": "120"
},
"CreatedById": {
"field_label": "Created By ID",
"type": "reference",
"length": "18"
},
"CreatedDate": {
"field_label": "Created Date",
"type": "datetime"
},
"Description": {
"field_label": "Description",
"type": "textarea",
"length": "500"
},
"Id": {
"field_label": "Attachment ID",
"type": "id",
"length": "18"
},
"IsDeleted": {
"field_label": "Deleted",
"type": "boolean"
},
"IsPrivate": {
"field_label": "Private",
"type": "boolean"
},
"LastModifiedById": {
"field_label": "Last Modified By ID",
"type": "reference",
"length": "18"
},
"LastModifiedDate": {
"field_label": "Last Modified Date",
"type": "datetime"
},
"Name": {
"field_label": "File Name",
"type": "string",
"length": "255"
},
"OwnerId": {
"field_label": "Owner ID",
"type": "reference",
"length": "18"
},
"ParentId": {
"field_label": "Parent ID",
"type": "reference",
"length": "18"
},
"SystemModstamp": {
"field_label": "System Modstamp",
"type": "datetime"
}
},
"field_reference_columns": [
"field_label",
"type",
"digits",
"length"
]
}