• Abhishek Mahajan
  • NEWBIE
  • 15 Points
  • Member since 2015
  • Abhi

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Hi guys. I'm trying to make a GET method from apex to generate an Access Token. I have to pass the access token to a URL in order to retrieve a JSON response. I don't know how to pass the client Id, client secret, endpoint, scope and grant type in apex.
Then I will pass the URL and access token to get the JSON I mentioned. 
Please can anyone help me with the code or how to set the Named Credentials. I've been looking for an example but all of them point to the Salesforce connected app.
I'm attaching a capture of the same in Postman. I tryed first in postman and it works.
Thanks in advance.


I want to replicate this in Salesforce
Hi,

How to use visual force components from managed packages in custom visualforce page?

Thanks in advance.
Hi,

I have a requirment where I want to print a every single record from a list using javascript.
Following is my conntroller and javaScript logic,

public class MyCompController
{
    public List<String> AccountIdList {get; set;}  
    public MyCompController()
    {
        List<Account> acc = [Select name, id from account];
        AccountIdList = new List<String>();
        for(Account a : acc)
        {
            AccountIdList.add(a.id);
        }   
    }
}

<script>
             var arr1 = new Array();      // OR var arr1 = [];       
             <apex:repeat value="{!AccountIdList}" var="accId">
                      arr1.push('{!accId}');
             </apex:repeat >                   
             alert('#### elements :' +arr1);       
</script>

Now I got list of accounts in arr1 array.
I want to print every single record of account , like (Name='abc', Id='a002800000NqbeB'), from this array in a table.

Please advice what needs to be done?
Thanks.

Hi guys,

 

today I received a strange error message after trying to change the controller in the visualforce editor

 

Error: java.sql.SQLException: ORA-00001: unique constraint (CORE.AKAPEX_CLASS) violated ORA-06512: at "HAPPY.CAPEX", line 505 ORA-06512: at line 1 : {call cApex.update_class(?,?,?,?,?,?,?,?,?,?,?,?)})} 

 

 

and remebered about a Blog article on Wes's Blog about strange error messages where I found this

 

  

Error: java.sql.SQLException: ORA-00001: unique constraint (CORE.AKAPEX_CLASS) violated ORA-06512: at “SNEEZY.CAPEX”, line 505 ORA-06512: at line 1 : {call cApex.update_class(?,?,?,?,?,?,?,?,?,?,?,?)})} 

.

 

 

Looks like some SF guys are huge fans 'Snow White and the Seven Dwarfs' .

 

 

So the big question is, where are the others and of course where's Snow White?