You need to sign in to do that
Don't have an account?
rupesh ranjan
Visualforce Error
Help for this Page
System.AssertException: Assertion Failed: <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="https://www.demomail.net/sf/">here</a>.</h2> </body></html>
Not Geting any value for API call
<apex:pageBlockTable value="{!performcallout4}" var="wrap" width="100%"> <apex:column headerValue="Subject" value="{!wrap.Subject}"/> <apex:column headerValue="Video Title" value="{!wrap.SessionTitle}"/> <apex:column headerValue="Sent Date" value="{!wrap.SentDate}"/> <apex:column headerValue="Subject" value="{!wrap.Subject}"/> <apex:column headerValue="Sent Date" value="{!wrap.SentDate}"/> <apex:column headerValue="Recipients" value="{!wrap.NoOfContacts}"/> <apex:column headerValue="Opens" value="{!wrap.OpenTimes}"/> <apex:column headerValue="View Count" value="{!wrap.ViewedTimes}"/> <apex:column headerValue="Part of mail merge?" value="{!wrap.SenderEmail}"/> </apex:pageBlockTable>
Visualforce Error
Help for this Page
System.AssertException: Assertion Failed: <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="https://www.demomail.net/sf/">here</a>.</h2> </body></html>
public class Contactpage1{ public Contactpage1(ApexPages.StandardController controller) { } public List<contactDemoMailSentwrap> ConsoleWrapperList4{get;set;} public List<contactDemoMailSentwrap> getperformcallout4(){ ConsoleWrapperList4 = new List<contactDemoMailSentwrap>(); HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); req.setEndpoint('https://www.demomail.net/sf/api/ContactDemoMailSent?Email=twilms@verisign.con&NameSpace=Demos%20On%20Demand%20Report'); req.setTimeout(10000); req.setMethod('GET'); res = http.send(req); //System.assert(false,res.getBody()); if(res.getstatusCode() == 200){ String replaceIllegal= res.getbody().replaceAll('\n','').replaceAll('\r',''); ConsoleWrapperList4= (List<contactDemoMailSentwrap>)System.JSON.deserialize(replaceIllegal,List<contactDemoMailSentwrap>.class); System.debug('***********: '+ ConsoleWrapperList4 ); } return consolewrapperlist4; } }
Here I have implemented same in my org and found thtis error. It is coming because you were asserting a boolean value with a string. so you can use below instead :
Please try this and mark this as best answer so it helps others also as verified answer.
Thanks
Sandeep Singhal
http://www.codespokes.com/
So how it will retrieve?
any changes in my code?