AnsweredAssumed Answered

Setting a foreign key

Question asked by kodiak347 on May 21, 2013
Latest reply on May 22, 2013 by kodiak347

I have the following relationships built and correctly displaying filted portals via a global field from the customers table.

TO Question.JPG


1. customers_CUSTOMERSITES is displaying the sites belonging to the customer and is able to add new CUSTOMERSITES via this relationship.

2. customers_customersites_CONTACTS 2 is displaying the contacts belonging to the cutomersites via the same global variable used to filter the 1st portal and is also able to add new contacts.


The problem I am having is I can not get the foreign key from CUSTOMERSITES of the 'currently filtered site' to set correctly, when adding a new customer via the portal. It only seems to want to set the foreign key to the 1st siteID.


Example: Two sites for a customer. Using the portal I am looking at site #2. Using the contacts portal I attempt to add a new contact. It adds the contact but sets the __kf_siteID to Site #1 and disapears from the portal for site #2. When I change the filter to site #1 there it is and I have to paste in the correct siteID.


I can accomplish this via a script and a new window, but would like to use the portal.


Any suggestions?