• Arnav Ray 1
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I am trying to create a class where I can extract the custom field per sobject but i am not able to do so as I am not getting any option to retrieve description field specifically. Rest of the details i can extract using the following method:-

https://blog.jeffdouglas.com/2011/10/20/getting-salesforce-field-metadata-the-easy-way/

Can someone please provide any working code for this?
Hi all,

I have requirement where I have to open a contact record after invoking the rest api but before returning the response.

My rest api class is:-
@RestResource(urlMapping='/Account/*')
global with sharing class RESTAgentController {

 @HttpPost
    global static String doPost(String customerId,String cus_context,String ContactNo) 
    {
        String customer_Id= customerId;
        String context= cus_context;
        String cus_ContactNo= ContactNo;       
        String agent_num='434343434';
        return agent_num;
    }    
}

The vf and the controller for opening the contact record are:-

Visualforce Page:-
<apex:page Controller="autoContactController" action="{!redirect}" > </apex:page>

Apex controller:-

public with sharing class autoContactController{
    
    public PageReference redirect() { 
        String phone = ApexPages.currentPage().getParameters().get('phone');
        String contactId = '0032800000ZW42T';
        PageReference pr = new PageReference('https://ap2.salesforce.com/console#%2F'+contactId);
        return pr; 
    }
}

Can anyone please help??????
Hi all,

I have requirement where I have to open a contact record after invoking the rest api but before returning the response.

My rest api class is:-
@RestResource(urlMapping='/Account/*')
global with sharing class RESTAgentController {

 @HttpPost
    global static String doPost(String customerId,String cus_context,String ContactNo) 
    {
        String customer_Id= customerId;
        String context= cus_context;
        String cus_ContactNo= ContactNo;       
        String agent_num='434343434';
        return agent_num;
    }    
}

The vf and the controller for opening the contact record are:-

Visualforce Page:-
<apex:page Controller="autoContactController" action="{!redirect}" > </apex:page>

Apex controller:-

public with sharing class autoContactController{
    
    public PageReference redirect() { 
        String phone = ApexPages.currentPage().getParameters().get('phone');
        String contactId = '0032800000ZW42T';
        PageReference pr = new PageReference('https://ap2.salesforce.com/console#%2F'+contactId);
        return pr; 
    }
}

Can anyone please help??????
I am trying to create a class where I can extract the custom field per sobject but i am not able to do so as I am not getting any option to retrieve description field specifically. Rest of the details i can extract using the following method:-

https://blog.jeffdouglas.com/2011/10/20/getting-salesforce-field-metadata-the-easy-way/

Can someone please provide any working code for this?
Hi all,

I have requirement where I have to open a contact record after invoking the rest api but before returning the response.

My rest api class is:-
@RestResource(urlMapping='/Account/*')
global with sharing class RESTAgentController {

 @HttpPost
    global static String doPost(String customerId,String cus_context,String ContactNo) 
    {
        String customer_Id= customerId;
        String context= cus_context;
        String cus_ContactNo= ContactNo;       
        String agent_num='434343434';
        return agent_num;
    }    
}

The vf and the controller for opening the contact record are:-

Visualforce Page:-
<apex:page Controller="autoContactController" action="{!redirect}" > </apex:page>

Apex controller:-

public with sharing class autoContactController{
    
    public PageReference redirect() { 
        String phone = ApexPages.currentPage().getParameters().get('phone');
        String contactId = '0032800000ZW42T';
        PageReference pr = new PageReference('https://ap2.salesforce.com/console#%2F'+contactId);
        return pr; 
    }
}

Can anyone please help??????

Hey guys,
I am getting this error "​No applicable approval process was found"
Here my code

​Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
        req1.setComments('Submitting request for approval.');
        req1.setObjectId(consignment.id);
        req1.setProcessDefinitionNameOrId('PTO_Request_Process');
        req1.setSkipEntryCriteria(true);
        system.debug('new approve'+req1);
        Approval.ProcessResult result = Approval.process(req1);
please help me guys..

Thanks
Vamsikrishna​