• Ganesh Babu 7
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
I need to bring the Javascript array output(list of record) into visualforce page and display in the Apex:repeat.
Without Apex Controller.

Code Below:

<apex:page >
    <script src="../../soap/ajax/43.0/connection.js" type="text/javascript"></script>
    <Script>
        function theme1(){
        sforce.connection.sessionId='{!GETSESSIONID()}'; 
        var result=sforce.connection.query('select name,description from Account limit 5');
        var myresult = result.records;
        var output='';
        var outputs=new Array();
        for(var i=0;i<myresult.length;i++)
        {
        outputs.push(myresult[i].Name);
        }            
      }
    </Script>    
    <apex:form id='f1'>
            <apex:commandButton value="save" onclick="theme1()"  status="whatstat" reRender="out" />    
            <apex:actionStatus id="whatstat" >
            <apex:repeat  value="outputs" var="a">   
              {!a}            
            </apex:repeat>
    </apex:form>
</apex:page>
Below is my Code, Is there any way we can pass the  selected Item value using actionsupport Param name selectedvalue

 <apex:selectRadio value="{!isselected[s.id]}"  id="col1">
             <apex:selectOption itemValue="true" itemLabel="Yes"  />
             <apex:selectOption itemValue="false" itemLabel="No"/>
            <apex:actionsupport action="{!optyline}" event="onclick" reRender="formid" immediate="false"   >
          <apex:param value="{!s.id}" assignTo="{!id}"  name="a"/>
          <apex:param value=""  assignTo="{!isselected[id]}" name="selectedvalue"/> 
         </apex:actionsupport>
         </apex:selectRadio>

 
I am getting below error as soon as i hit Name  ( inside Command Link). It was Supposed show the detail page but it throws error.

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors. 
Profiles and all field level security are taken care.

VF Page:

<apex:page standardController="Account" recordSetVar="accounts">
<apex:form >
<apex:pageBlock title="Accounts">
<apex:dataList value="{!accounts}" var="a" >
<apex:commandLink reRender="depage">
{!a.name}
<apex:param name="cid" value="{a.id}"/>
</apex:commandLink>
</apex:datalist>
<apex:outputPanel id="depage">
<apex:detail subject="{!$CurrentPage.parameters.cid}"  relatedList="false"/>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Can anyone help me on getting  below data , some sample endpoint URL and response as XML.
New to Integration, learning how the parse  json and xml from response. I have one url for json( https://api.androidhive.info/contacts/) but not for xml.

Thanks in Advance.....

HttpRequest req=new HttpRequest();
req.setendpoint(' ? ');
req.setmethod('GET');
http req1=new http();
httpResponse xmlresponse=req1.send(req);

 
I am getting below error as soon as i hit Name  ( inside Command Link). It was Supposed show the detail page but it throws error.

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors. 
Profiles and all field level security are taken care.

VF Page:

<apex:page standardController="Account" recordSetVar="accounts">
<apex:form >
<apex:pageBlock title="Accounts">
<apex:dataList value="{!accounts}" var="a" >
<apex:commandLink reRender="depage">
{!a.name}
<apex:param name="cid" value="{a.id}"/>
</apex:commandLink>
</apex:datalist>
<apex:outputPanel id="depage">
<apex:detail subject="{!$CurrentPage.parameters.cid}"  relatedList="false"/>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Can anyone help me on getting  below data , some sample endpoint URL and response as XML.
New to Integration, learning how the parse  json and xml from response. I have one url for json( https://api.androidhive.info/contacts/) but not for xml.

Thanks in Advance.....

HttpRequest req=new HttpRequest();
req.setendpoint(' ? ');
req.setmethod('GET');
http req1=new http();
httpResponse xmlresponse=req1.send(req);