+ Start a Discussion
AntonyasLenAntonyasLen 

Linking attachement Opportunity with Custom Item

Hi,

 

Well, i'll try to be very clear, please let me my explanation are weird

 

****************************************************************************************************

Background:

 

The Opportunity is the main object of my salesman's work-in-process.

I created  a custom object called Payment( the amount of an opportunity can be split in a few payment)

 

I created a custom object called Invoice, invoices have two different type : Deposit - Delivery .

Each Invoice type has a different visual force page( so far 2 template).

 

I want to create and attach .pdf to my Opportunity ( i know how to do it i done it for the quote object ), but the hard my problem is that i want to create the .pdf with Invoices datas and also the deposit and delivery invoices will not be created at the same time.

This have to be automatic.

 

- Deposit invoice are created when i will set a Payment as a deposit.

- Delivery invoices will be generated when the customer order will be delivered ( manual set).

 

 

****************************************************************************************************

 

Does anyone can help me to define the best process ?

 

 

edit: here an other to as my  question.....

can i make a visual force page(rend as pdf) but attach it to the master opportuntity???

 

crop1645crop1645

1 - A VF page rendered as a PDF can most definitely be attached to an SObject. AFAIK, only a VF controller can do this

 

2 - As long as your VF controller associated with an invoice creation/update has a way to locate the Opportunity, then the controller can create the attachment with the opportunity as the parent (use parentId field on the attachment)