Opportunities::k_ID_Opportunity = Quotes::kf_ID_Opportunity
Please note, you can also create new Quotes records directly in your portal if you select "allow creation of records via this relationship" for Quotes in the above relationship.
Your script looks correct except for a real picky detail.
In line one, the variable is named $ID_Opportunity. In line two, you refer to a different variable: $ID_Opportunities
change $ID_Opportunities to $ID_Opportunity and it should work for you.
I will try this later and confirm. On the "you can also create new Quotes records directly in your portal if you select "allow creation of records via this relationship" for Quotes in the above relationship."
Is this done on the script, or in the relationship properties?
It's a relationship property. You open manage | Database | Relationships, find the relationship line for the relationship on which your portal is based and double click it to bring up a dialog box where this option may be selected. Once you have selected it, you can create new related records by entering data into any field in the bottom blank "add" row of your portal. This isn't always a convenient way to add related records as you have to scroll your portal to what might be a long list of existing related records each time you add a new quote so you may find that the button is still a better way to go--especially if you set up sorting on your portal rows so that the newest quote is listed first instead of last.
Ok. That was it! I looked at that darn thing over and over and did not catch that.
Last question.. "today"... Both Tables also have a Title Field these fields are not currently related.
Is it possible to modify the script to also carry over the title field from the Opportunity to the Quote, although retaining the true "relationship" to be the kf_ID_Opportunity.
I played with this and got it to work where it imported the Title into both the KF & Title fields, and also the Opp_ID in both fields, but cant seem to split them correctly.
Thanks Again for your great help!
Do you really need the field to be in both tables?
Any layout or portal based on Quotes can simply use the field from Opportunities to display this data. Just add the field from Opportunities to the layout or portal row and the related record in Opportunities will supply the Title.