• Ayub Ansari
  • NEWBIE
  • 50 Points
  • Member since 2014
  • Engineer By Choice
  • Grazitti

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 9
    Replies
Hi Gurus,

I have created a form in VF that is linked to a custom object in Salesforce. After the form is completeed, the user is automatically directed to the home page of my website - as I done via an extention apex page. 

However if I was to change my website, I will have to keep changing my code - which I obivously do not want to keep doing.

So how can I update my website URL without entering my VF code? I was told I could use a static resource but i'm yet to understand how it can be achieved using it even after research

Please if anyone knows how it can be achieved let me know, thanks very much!
 
Hi,

I want to customize (or replace) this thing, what's its name?

Home Page List

Is there a visual guide somewhere where I can find answers to this kind of question for myself?

Thanks in advance!

Cheers,
Thorsten
Currently Territorries field on Account is not accessible in formula/apex directly that cause a lot of effort to work on this field. Also, the changes to this field is not tracked in trigger too. So, it's hard to automate anything based on this field. 

3 months ago, I created this Idea for the same: https://success.salesforce.com/ideaView?id=08730000000cJNpAAM, but I am wondering no one is looking for this feature :(  

 
Hi Salesforcian,

As per the definition of object EntityDefinition (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_entitydefinition.htm#recordtypessupported) (a tooling API object), we can query "recordTypeSupported" as sub-query:

User-added image


By using workbench, I am trying to query same data as following but I am getting exception - "Didn't understand relationship 'RecordTypesSupported' in FROM part of query".
/services/data/v34.0/tooling/query/?q=select+id,+(select+recordTypeInfos+from+RecordTypesSupported)+from+EntityDefinition+where+KeyPrefix='001'
Does anybody have a clue why this is happening?

Thanks in advance!!
-Ayub. 


 
Hi,

I am trying to access metadata of Profile by using tooling api, when I request query without adding any filter as given below, I am getting response as expected:

string epoint = 'https://ap1.salesforce.com/services/data/v32.0/tooling/query?q=SELECT+Description,+Name,+Metadata,+FullName+FROM+Profile';

But, as I am adding a filter as below, I am getting error- "Bad Request" Status Code= 400. Please note that this query executes as expected in developer console--> Query Editor, but throw specified error when trying to execute apex code in anonymous block.

String epoint = 'https://ap1.salesforce.com/services/data/v32.0/tooling/query?q=SELECT+Description,+Name,+Metadata,+FullName+FROM+Profile+where+Name=\''+'System Administrator'+'\'';

I have already posted this question on developer forum. Any help would be greatly appreciated.

Thanks,
-Ayub
Currently Territorries field on Account is not accessible in formula/apex directly that cause a lot of effort to work on this field. Also, the changes to this field is not tracked in trigger too. So, it's hard to automate anything based on this field. 

3 months ago, I created this Idea for the same: https://success.salesforce.com/ideaView?id=08730000000cJNpAAM, but I am wondering no one is looking for this feature :(  

 
Hi Gurus,

I have created a form in VF that is linked to a custom object in Salesforce. After the form is completeed, the user is automatically directed to the home page of my website - as I done via an extention apex page. 

However if I was to change my website, I will have to keep changing my code - which I obivously do not want to keep doing.

So how can I update my website URL without entering my VF code? I was told I could use a static resource but i'm yet to understand how it can be achieved using it even after research

Please if anyone knows how it can be achieved let me know, thanks very much!
 
I have a VF page that displays a Content cannot be displayed: Map key not found in map error.  There isn't anything in the debug log or console pertaining to this error.  The page references several maps and I don't know which one the error is referring to.  Is there a debug log setting or another tool that would allow me to track down the issue?
Hi,

I want to customize (or replace) this thing, what's its name?

Home Page List

Is there a visual guide somewhere where I can find answers to this kind of question for myself?

Thanks in advance!

Cheers,
Thorsten
Hi Salesforcian,

As per the definition of object EntityDefinition (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_entitydefinition.htm#recordtypessupported) (a tooling API object), we can query "recordTypeSupported" as sub-query:

User-added image


By using workbench, I am trying to query same data as following but I am getting exception - "Didn't understand relationship 'RecordTypesSupported' in FROM part of query".
/services/data/v34.0/tooling/query/?q=select+id,+(select+recordTypeInfos+from+RecordTypesSupported)+from+EntityDefinition+where+KeyPrefix='001'
Does anybody have a clue why this is happening?

Thanks in advance!!
-Ayub. 


 

Hello,

I am trying to use Continuation for the first time and am hitting a strange error. Below is a simple page I created with both a Synchronous Callout and a Continuation Callout button. When, in my developer org, I press the "Synchronous Callout" button, I get a response as expected. When I press the "Continuation Callout" button I get an error, "Apex class 'ApexPage.ContinuationController' does not exist". Have you seen this? Do I not understand Continuation?

Page:

<apex:page controller="ContinuationController" showChat="false" showHeader="false" sidebar="false" id="pg">
	<apex:pageMessages id="frmMsgs"/>	
	<apex:form id="pgFrm" >
		<apex:commandButton action="{!testSyncCallout}" value="Synchronous Callout" reRender="frmMsgs"/>
		<apex:commandButton action="{!testContinuationCall}" value="Continuation Callout" reRender="frmMsgs"/>
	</apex:form>	
</apex:page>
 

Controller:

public with sharing class ContinuationController {
	
    private String returnedContinuationId;
    private String baseSericeURL = '<Im not telling you my url!>';

	public ContinuationController() {}

	public void testSyncCallout() {
        HttpResponse testResponse = new HttpResponse();
        HttpRequest testRequest = new HttpRequest();
        HTTP HTTPService = new HTTP();
        testRequest.setMethod('GET');
        testRequest.setEndpoint(baseSericeURL);
        testRequest.setTimeout(60000);
        testResponse = HTTPService.send( testRequest );
        ApexPages.addMessage( new ApexPages.Message(ApexPages.Severity.INFO,  testResponse.getStatusCode() + ': ' + testResponse.getStatus() + ' '+ testResponse.getBody()) );
    }

    public Object testContinuationCall() {
        //Timeout in seconds, 60 is limit
        Continuation con = new Continuation(60);
        //Set callback method
        con.continuationMethod='testContinuationCallback';
        //Create callout request
        HttpRequest req = new HttpRequest();
        req.setMethod('GET');
        req.setEndpoint(baseSericeURL);
        returnedContinuationId = con.addHttpRequest(req);
        return con;
    }

    public Object testContinuationCallback() {
        //Get the response by using the unique label
        HttpResponse httpRes = Continuation.getResponse(returnedContinuationId);
        ApexPages.addMessage( new ApexPages.Message(ApexPages.Severity.INFO,  httpRes.getStatusCode() + ': ' + httpRes.getStatus() + ' '+ httpRes.getBody()) );
        //Return null to re-render the original Visualforce page
        return null;
    }
}


Error Message:
User-added image

Hi,

I am trying to access metadata of Profile by using tooling api, when I request query without adding any filter as given below, I am getting response as expected:

string epoint = 'https://ap1.salesforce.com/services/data/v32.0/tooling/query?q=SELECT+Description,+Name,+Metadata,+FullName+FROM+Profile';

But, as I am adding a filter as below, I am getting error- "Bad Request" Status Code= 400. Please note that this query executes as expected in developer console--> Query Editor, but throw specified error when trying to execute apex code in anonymous block.

String epoint = 'https://ap1.salesforce.com/services/data/v32.0/tooling/query?q=SELECT+Description,+Name,+Metadata,+FullName+FROM+Profile+where+Name=\''+'System Administrator'+'\'';

I have already posted this question on developer forum. Any help would be greatly appreciated.

Thanks,
-Ayub

Hi All,

 

I am new to Saleforce development. Please can any one guide me to sample apex code to create(add) custom fields to custom or standard objects dynamically using Salesforce Metadata API in my development org.

 

Thanks in advance.

  • June 29, 2011
  • Like
  • 0

Hey All,

 

Is there a way to remove the new line character '/n' from a Long Text Area in Apex? I am trying to pass to a google fusion obj and they don't handle the '/n' character and throw an exception. Any idea how I can take a long text area(we will call it LT__c) and have it remove the new line characters? Is this supported nativly in apex?

 

Thanks!

-Chris

  • June 01, 2011
  • Like
  • 0