You need to sign in to do that
Don't have an account?
Error --> No serializer found for class common.api.soap.wsdl.Address - JS Remoting
When I am trying to fetch the Billing Address in the Account In , it gives such an error..
What is the fix for this if I have to dispaly the Account Address?

VF Code
<apex:page controller="VFRemoteAction" sidebar="false">
<head>
<style>
#errors{color:red;font-size:15px;font-style:bold;margin:5px; width:100%;}
#result{color:green;font-size:25px;font-style:bold;margin:5px; width:100%;}
</style>
<script>
var getAccount = function(){
var accountName = document.getElementById('account_name').value;
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.VFRemoteAction.getAccount}',
accountName,
function(result,event){
if(event.status){
document.getElementById('result').innerHTML="<p> Name :"+result.Name+"</p>"+
"<p> Website :"+result.Site+"</p>"+
"<p> Address :"+result.BillingAddress+"</p>" ; ????????????
}
else{
document.getElementById('errors').innerHTML="Error --> "+event.message;
}
},
{escape: true}
);
}
</script>
</head>
<body>
<apex:pageBlock >
<apex:pageBlockSection title="Search for an account" columns="2">
<div id="errors">
</div>
<div id="input">
<label>Enter the account name:</label>
<input type="text" name="account_name" id="account_name"/>
<button onclick="getAccount()">Get Account</button>
</div>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:outputPanel >
<div id="result">
</div>
</apex:outputPanel>
</body>
</apex:page>
What is the fix for this if I have to dispaly the Account Address?
VF Code
<apex:page controller="VFRemoteAction" sidebar="false">
<head>
<style>
#errors{color:red;font-size:15px;font-style:bold;margin:5px; width:100%;}
#result{color:green;font-size:25px;font-style:bold;margin:5px; width:100%;}
</style>
<script>
var getAccount = function(){
var accountName = document.getElementById('account_name').value;
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.VFRemoteAction.getAccount}',
accountName,
function(result,event){
if(event.status){
document.getElementById('result').innerHTML="<p> Name :"+result.Name+"</p>"+
"<p> Website :"+result.Site+"</p>"+
"<p> Address :"+result.BillingAddress+"</p>" ; ????????????
}
else{
document.getElementById('errors').innerHTML="Error --> "+event.message;
}
},
{escape: true}
);
}
</script>
</head>
<body>
<apex:pageBlock >
<apex:pageBlockSection title="Search for an account" columns="2">
<div id="errors">
</div>
<div id="input">
<label>Enter the account name:</label>
<input type="text" name="account_name" id="account_name"/>
<button onclick="getAccount()">Get Account</button>
</div>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:outputPanel >
<div id="result">
</div>
</apex:outputPanel>
</body>
</apex:page>
Similar query http://salesforce.stackexchange.com/questions/29304/with-json-how-to-serialize-the-accounts-shipping-and-billing-address
All Answers
Similar query http://salesforce.stackexchange.com/questions/29304/with-json-how-to-serialize-the-accounts-shipping-and-billing-address