I'm looking at creating a form which contains a dropdown of values from my customer table, specifically the customer_ID attribute.
So far I have changed the customer_ID field in the form to a Select List and created this query to try and fetch the existing IDs:
SELECT Customer_ID
FROM tbl_Customer;
And I am given the error
Column "CUSTOMER_ID" specified for attribute "" has not been found in data source!
I've been searching around for similar issues without much luck, so if anyone has a link to an article or video about this it would be appreciated, thanks!
Edit:
SELECT First_Name as display_value,
Customer_ID as return_value
FROM tbl_Customer;
This allows me to view the page but the new problem is that I am only able to display the first name like this, and when I select something from the dropdown it does not appear, and seems to buffer forever.
I have also tried achieving this by using a shared component, which creates a list of the customers, using this query:
SELECT CONCAT(First_Name, Last_Name) as display_value,
Customer_ID as return_value
FROM tbl_Customer;
But the infinite buffering issue still happens, and I believe that the issue may be something to do with locating the Cutomer_ID as leaving the dropdown on its default value, and submitting the form creates a record which seems to leave the ID column as null ("-") in the Apex object browser.