About this question
I am trying to write a VF page to list all the id and name columns from a custom object but found an error "List has more than 1 row" in the VF page. Can anyone tell me what have I done wrong?
VF Page
Apex controller
global with sharing class MP_controller { public Merchant_Profile__c mp{get;set;} public MP_controller(){ mp = [SELECT ID, name, Profile_account_name__c, Merchant_ID__c, Bank_Code__c, Country_Code__c, Currency_Code__c, Merchant_Level__c, Merchant_Type__c, MSO__c, Region__c, Retail_Products__c, Transaction_Mode__c, Created_Date__c, Date_Disabled__c, Date_Live__c, Merchant_Category_Code__c FROM Merchant_Profile__c WHERE Profile_Account_Name__c = '001O000000bQFnyIAG']; } }