OrangeScape Developer Community

A community for Application Developers on OrangeScape's Platform-as-a-Service

attaching an already attached file from one model to another model


We have a requirement as follows.  

There are various documents which the user has to edit and attach.  We have a master where we want to store all the various documents which the user might need.  On transaction when they click a button, based on the certain parameters, the file to be given is determined, and

  1. need to be given a download link to the user in the form
  2. sent as attachment in email.

To do this, i am planning to copy the attachment from the master model to the transaction, by using the New Action Command, and setting the Attachment field value of Master to Attachment Field value of transaction. 

Will doing so work? Is this the correct way to do it? If not please let us know the proper way to do it.?

Views: 117

Reply to This

Replies to This Discussion

Hi Anbu,

We don't access to copy the attachment(system model). Its all about your requirement based implementations.

Please tell me few things,

You need a copy of original attachment into the transaction?

Is that user will modify(remove/reattach) the attachment in the transaction record?

Hi Kamal,

     Yes, I need a copy of original attachment in transaction.  Because, at later stage the master document might change, but the transactions which has used this document as template should not change.

     Yes, they will reattach the attachment in transaction

Hi Anbu,

If we need to take a copy of attachment, then we have to write custom code for archiving this.

Using jQuery api's, you need to download the file from master and attach in to the transaction record.


    If i am not wrong, the uploaded file is being stored into the datastore.  it would be much easier to copy it on the server side, rather than downloading it and then attaching it from the client side code.  

    Are you saying this is the only way to do this?


We don't have any other option to implement this. Because server side api's are not available.

Hi Kamal,

Is there any other way to do this or is this is the suggested way?


Server side api's are not available. So in the client side, download the file using api's.. keep it in buffer/drive and upload the file in to the transaction.


© 2018   Created by OrangeScape Technologies.   Powered by

Badges  |  Report an Issue  |  Terms of Service