• Vladik
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

I have a problem with parsing post request to my apex page.

Application outside of salesforce access to visualforce page ( through the sites ) and transfer some data. I need to get all data.

This construction does not work:
String post_request = ApexPages.currentPage().getParameters().get('parameter');

Because saleforce expecting data:
'color=red&size=small&height=tall'

But real data is:
'qposkicimshfjslmcownk'

 

In other words - I need to get this string without salesforce parsing.



I have a problem with parsing post request to my apex page.

Application outside of salesforce access to visualforce page ( through the sites ) and transfer some data. I need to get all data.

This construction does not work:
String post_request = ApexPages.currentPage().getParameters().get('parameter');

Because saleforce expecting data:
'color=red&size=small&height=tall'

But real data is:
'qposkicimshfjslmcownk'

 

In other words - I need to get this string without salesforce parsing.

Hi gujs.

I use custom visualforce page and class to create new record of my custom object (override standart "new" button to visualforce page ). This object have a sets of validation rules for 5 different fields.

When I leave these fields blank and try to save the object, then validation error displayed but only for one field. If I fill this field with value and save the object, then error is displayed for next unfilled field.

I want to display all errors simultaneously, but not sequental. But have no idea how to do it.

 

There is a piece of code from my apex class where I instert record

 

 

	public PageReference SaveEvent(){
		try {
			insert ev;
		}
		catch (DmlException e){
			ApexPages.addMessages(e);
			Debug = String.valueOf(e);
			return null;
		}
...
			
			

 

 

 

 

 
           

  • April 18, 2011
  • Like
  • 0

I have a problem with parsing post request to my apex page.

Application outside of salesforce access to visualforce page ( through the sites ) and transfer some data. I need to get all data.

This construction does not work:
String post_request = ApexPages.currentPage().getParameters().get('parameter');

Because saleforce expecting data:
'color=red&size=small&height=tall'

But real data is:
'qposkicimshfjslmcownk'

 

In other words - I need to get this string without salesforce parsing.

Hi gujs.

I use custom visualforce page and class to create new record of my custom object (override standart "new" button to visualforce page ). This object have a sets of validation rules for 5 different fields.

When I leave these fields blank and try to save the object, then validation error displayed but only for one field. If I fill this field with value and save the object, then error is displayed for next unfilled field.

I want to display all errors simultaneously, but not sequental. But have no idea how to do it.

 

There is a piece of code from my apex class where I instert record

 

 

	public PageReference SaveEvent(){
		try {
			insert ev;
		}
		catch (DmlException e){
			ApexPages.addMessages(e);
			Debug = String.valueOf(e);
			return null;
		}
...
			
			

 

 

 

 

 
           

  • April 18, 2011
  • Like
  • 0

I need to acces Partner server url global variable from apex code in order to pass it into web service.

In visualforce i can write the followin statement in page layout  {!$Api.Partner_Server_URL_120} which renderes something like that https://na5.salesforce.com/services/Soap/u/12.0/461200D70000000IfeF

How can i access {!$Api.Partner_Server_URL_120}  variable from apex code?

Thanks in advance