2

I have a custom object in database.com. I need to attach the particular Images / Documents for particular records.

how can we relate the particular record with the attachment in database.com.

A visualforce page has been developed in salesforce.com for the login of the database.com users(database.com credentials) and user will be pulling the records from the database.com for searching particular images with description.

Please help !!!

Thanks

1

This seems very similar to this question is it possible store images and documents in database.com.

But focussing in on attachments, an Attachment object has a ParentId field that is the Id of the object (e.g. Contact) that it is attached to. In normal Salesforce there is standard user interface to upload attachments for an object; if that is not available in Database.com then you will have to do that programatically.

In normal Salesforce, an Attachment can be viewed (assuming the request includes authentication information) using a URL of this form "/servlet/servlet.FileDownload?file=00Pi0000005EOWB" where the ID is the ID of the Attachment.

The Attachment object can't be customised, but does have Name and Description fields available (and can be used for various content types such as images and documents with the type recorded in the ContentType field).

I do not understand how your Salesforce Visualforce login page will allow Database.com access. Or perhaps you are looking to store the images/documents in Database.com and relate them to objects in Salesforce.com. So if either of those are the central point of your question, perhaps you can clarify the question and then hopefully someone else can answer.

9
  • HI, Thanks for the reply but we don't want to attach any document in Salesforce.com, instead of that we have created object in database.com. For that custom object's record we want to attach images/Documents. 2) Visualforce login page is 'public' for authentication for database.com light users who can use their UN/Password for authentication to redirect to the landing page(In my case its search page). Search data will come from database.com. Hope you understand my issue.
    – Allwin
    Apr 2 '14 at 10:42
  • @Allwin I think I do now. As in the question I have linked to, Database.com is the same database engine as Salesforce.com so what works in one should work in the other. So where I say Salesforce.com in my answer just imagine it says Database.com instead.
    – Keith C
    Apr 2 '14 at 11:18
  • Hi Keith, In salesforce if you have enabled the Custom Object for "Notes & Attachments", you can add the "Notes & Attachments" related list to the page layout which will allow you to upload attachments but in database.com there is no option to enable 'Note & Attachment' for custom object. Please let me know how to enable Attachment or how to attached for custom object which is in database.com.
    – Allwin
    Apr 2 '14 at 12:25
  • I just created a new "Free Trial" starting from keying database.com into my browser and it just looks like a normal Force.com org (but with less in it). The "Notes and Attachments" detail list is available in the layouts; there isn't a switch on the custom object as AFAIK it is always enabled. Try it in your org.
    – Keith C
    Apr 2 '14 at 12:42
  • Hi Keith, Even I have created new instance and logged in with url login.database.com. As far as I know there is no page layout/pages provided by database.com. You can only see the uploaded record on console. Even I have tried checking on workbench that how many standard objects database.com have But it does not show attachment as part of it. Do we have any feature in database.com that has attachments features. If yes, then how can I add that to my custom object(Let say Product).
    – Allwin
    Apr 2 '14 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.