Jump to content
Salesforce and other SMB Solutions are coming soon. ×

hwahren
 Share

Recommended Posts

Apologies for what should be a simple problem. I have three tables: Invoices, Customers and Invoice data. I just want to create a standard customer form that has a portal with a list of the customer's invoices.

However, no invoices (records) are displayed in the portal. The primary and foreign keys seem to be set up correctly, but when looking at a table view of invoices, the fk_customer_id is empty, whereas the customer_id of this same invoice table is correct. I must've done something wrong when creating the invoices, but I'm not sure what or how to fix the problem.

Link to comment
Share on other sites

when looking at a table view of invoices, the fk_customer_id is empty

 

Well, that certainly explains why your portal is empty. So your unsolved mystery (at this point) is not why your portal records are not showing, but, rather, why your foreign key field is empty.

 

How ARE you creating your invoice records? Please be complete and unabridged in your answer. If there is a script, please provide the script in its entirety. If the invoice records are created via a manual operation please describe each click and keystroke and don't leave anything out.

 

--------

 

Meanwhile, I can tell you a method that will work for creating new invoices. Open Manage Database and to to the Relationships tab. Edit the relationship between Customers and Invoices. (I"m assuming you do indeed have a relationship between Customers and Invoices????? And the relationship is set up to connect the Customers primary key field to the Invoices foreign key field, right?????)

 

Check the checkbox on the Invoices side of the relationship, the checkbox at the bottom where it says "Allow creation of records in this table via this relationship".

 

OK your way out of Manage Database.

 

Go to the Customer layout, where, if I understand correctly, you have a portal to Invoices (yes?). If your portal does not show a scroll bar, add one by double-clicking your portal in Layout Mode and checking the checkbox "Show vertical scroll bar" in Portal Setup.

 

 

Now to create a new Invoice for Customer "Joe Blow" you go to Joe Blow's customer record and you go to the bottom-most Invoice portal row. There will always be one blank row — for now it will be the only portal row but no matter how many you create you'll always have an empty one on the bottom. Type a value in any editable field in the portal row and instantly a new Invoice will spring into existence and it will definitely have the foreign key field filled in properly. To fill in any fields that don't display in the portal, add a tiny button in the portal row, while in Layout Mode, that does a Go to Related Records, specifying that it should take you to an Invoices layout, where you'll fill in the remaining fields.

Link to comment
Share on other sites

Thank you AHunter! As your explanation showed straight away, I had set up the relationship incorrectly. The relationship from Customers was from pk_Customer to the Invoice line-item table (fk_Customer) and NOT to the Invoices table, which also has the foreign key fk_Customer. Very stupid of me. I just didn't see the obvious until you pointed it out. Thank you heaps for your detailed response.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use