{"id":39312,"date":"2022-07-25T16:52:48","date_gmt":"2021-05-18T11:15:35","guid":{"rendered":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/?p=39312"},"modified":"2022-07-25T16:52:48","modified_gmt":"2022-07-25T16:52:48","slug":"record-cannot-be-created-in-attachment-object","status":"publish","type":"post","link":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/","title":{"rendered":"Error: The record could not be created in the Attachment object ? how do I fix it?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\" id=\"h-why-does-it-show-up\"><strong>Why does it show up<\/strong>?<\/h4>\n\n\n\n<p id=\"h-why-does-it-show-up-when-creating-an-attachment-in-salesforce-the-body-of-the-attachment-is-a-required-field-if-you-get-this-error-it-means-that-no-file-was-uploaded-on-the-form\">When creating an Attachment in Salesforce, the body of the Attachment is a required field.<br>Therefore, if you get this error, it means that no file was uploaded on the form.<\/p>\n\n\n\n<p>Full error message:<br><em>The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.<\/em><br><br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-how-to-prevent-this-from-happening\"><strong>How to prevent this from happening:<\/strong><\/h4>\n\n\n\n<p>1. Make the File upload field on the form required (of course, if it&#8217;s mandatory for the submission) &#8211; this won\u2019t allow the user to submit the form if there is no file uploaded.<br><br>2. Send data to Salesforce <b>only<\/b> when the File upload field is not empty. Go to Object Mapping &#8211; Attachment and for Record preferences, under <b>Send data if <\/b>select your upload field and choose to create the record if this field is not empty.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png\" alt=\"Salesforce Record Preferences\" width=\"697\" height=\"401\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Why does it show up? When creating an Attachment in Salesforce, the body of the Attachment is a required field.Therefore, if you get this error, it means that no file was uploaded on the form. Full error message:The record could not be created in the Attachment object. Reason: There was nothing attached to the body [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":-1,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[134],"tags":[],"class_list":["post-39312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-123formbuilder-appexchange"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>The record could not be created in the Attachment object<\/title>\n<meta name=\"description\" content=\"The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Error: The record could not be created in the Attachment object ? how do I fix it?\" \/>\n<meta property=\"og:description\" content=\"The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/\" \/>\n<meta property=\"og:site_name\" content=\"123FormBuilder Knowledge Base\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-18T11:15:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-25T16:52:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The record could not be created in the Attachment object","description":"The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/","og_locale":"en_US","og_type":"article","og_title":"Error: The record could not be created in the Attachment object ? how do I fix it?","og_description":"The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.","og_url":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/","og_site_name":"123FormBuilder Knowledge Base","article_published_time":"2021-05-18T11:15:35+00:00","article_modified_time":"2022-07-25T16:52:48+00:00","og_image":[{"url":"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#article","isPartOf":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/"},"author":{"name":"admin","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea"},"headline":"Error: The record could not be created in the Attachment object ? how do I fix it?","datePublished":"2021-05-18T11:15:35+00:00","dateModified":"2022-07-25T16:52:48+00:00","mainEntityOfPage":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/"},"wordCount":161,"commentCount":0,"image":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#primaryimage"},"thumbnailUrl":"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png","articleSection":["AppExchange"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/","url":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/","name":"The record could not be created in the Attachment object","isPartOf":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#primaryimage"},"image":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#primaryimage"},"thumbnailUrl":"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png","datePublished":"2021-05-18T11:15:35+00:00","dateModified":"2022-07-25T16:52:48+00:00","author":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea"},"description":"The record could not be created in the Attachment object. Reason: There was nothing attached to the body of the Attachment object.","breadcrumb":{"@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#primaryimage","url":"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png","contentUrl":"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/SFAttachmentPreferences.png"},{"@type":"BreadcrumbList","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/record-cannot-be-created-in-attachment-object\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/"},{"@type":"ListItem","position":2,"name":"Error: The record could not be created in the Attachment object ? how do I fix it?"}]},{"@type":"WebSite","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/#website","url":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/","name":"123FormBuilder Knowledge Base","description":"Search our documentation platform for answers, service specifications and 3rd-party integrations.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","caption":"admin"},"url":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/posts\/39312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/comments?post=39312"}],"version-history":[{"count":12,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/posts\/39312\/revisions"}],"predecessor-version":[{"id":43701,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/posts\/39312\/revisions\/43701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/media?parent=39312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/categories?post=39312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/123formbuilder.polarbuildingcleaning.net\/docs\/wp-json\/wp\/v2\/tags?post=39312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}