• cwall_sfdc
  • NEWBIE
  • 380 Points
  • Member since 2007

  • Chatter
    Feed
  • 14
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 158
    Replies

I'm trying to use new Input and InputField with type attribute. I need to use the date or datetime type as follow:

 

<apex:input value="{!birthdayDate}" type="date" styleClass="select-box"/>

 with corresponding controller:

 

public Date birthdayDate {
    get;
    set {
        System.debug('birthdayDate setter: ' + value);
        birthdayDate = value;
        currentAccount.PersonBirthdate = value;
    }
}

 

But when the user clears the field by clicking on the "x" button, the setter is not triggered and value cannot be reset.

I could use the inputField instead directly on PersonBithdate field, but I get an "Error: Invalid Date" when submitting the form.

FYI : I'm using API 29 (as requested by the Winter 14 release notes) for this files.

Thanks for your help.

 

I'm having trouble with the following code, for date fields only.  I assume it is because the date is not formatted correctly when passing the sobject json to the remote action.  I have tried a few different formats and there seems be a concensus that the date-time format is  ISO8601.  This is fine, but the middle option is formatted with ISO8601 and no dice.  

 

I am using the javascript date() to format the strings as well.

 

This does work for normal string/picklist fields, so that is why I am seeking help for the date field values.  Any help is greatly appreciated.

 

controller:

@RemoteAction
global static void setField(sObject obj) 
{
	upsert obj;
}

 

 

json:

var sObj = {id: "003Xxxxxxxxxxxxx", Date_of_Next_Meeting__c: "2013-08-26"};
or
var sObj = {id: "003Xxxxxxxxxxxxx", Date_of_Next_Meeting__c: "2014-06-23T07:00:00.000Z"};
or
var sObj = {id: "003Xxxxxxxxxxxxx", Date_of_Next_Meeting__c: "6/23/2014"}

 

 

js function;

Controller.setField(sObj, function(result, event){
		if (!event.status && event.type == "exception") {

			$j("[id$=':msgs']").text("Unable to save meeting preference:" + event.message).show();
		}
});

 

 

 JSON received in chrome js console:
action: "Controller"
data&colon; Array[1]
message: "Unexpected type for Controller.setField(SObject)"
method: "setField"
ref: false
result: null
statusCode: 400
tid: 15
type: "exception"
vfDbg: true
vfTx: true
where: ""
__proto__: h
 
and:
$VFRM.Util.error VFRemote.js:114
(anonymous function) VFRemote.js:130
a.Event.fire VFRemote.js:50
a.Observable.fireEvent VFRemote.js:45
VFExt3.Direct.VFExt3.extend.onProviderData VFRemote.js:84
a.Event.fire VFRemote.js:50
a.Observable.fireEvent VFRemote.js:45
VFExt3.direct.RemotingProvider.VFExt3.extend.onData VFRemote.js:92
VFExt3.extend.handleResponse VFRemote.js:73
a VFRemote.js:37
(anonymous function)
 

 

Hello, I develop en an Android application with the Salesforce Mobile SDK to store datas offline in using smartstore.

I saw the Mobile SDK Workbook but it's not said how store manually datas with smartstore.

Per example, I want when a user populate a form and submit it, store form's informations in the mobile with smartstore and I don't how do it.

In this time, I tried this :

function Track(){
    this.Id = null;
    this.Name = null;
    this.Price__c = null;
    this.Album__c = null;
    this.Album__r = null;
}

function Album(){
    this.Id = null;
    this.Name = null;
}

var track = new Track();
track.Id = $j('#idInput').val();
track.Name = $j('#nameInput').val();
track.Price__c = $j('#priceInput').val();
track.Album__c = $j('#albumIdInput').val();
track.Album__r = new Album();
track.Album__r.Id = $j('#albumIdInput').val();
track.Album__r.Name = "A name";

var myTable = [];
myTable.push(track);

addOfflineTracks(JSON.stringify(myTable), successAdd, errorAdd);

 

I get an error :

http://nsa33.casimages.com/img/2013/08/12/130812124002327909.png

 

 

I guess than I don't give the good datas to store with smartstore because when datas are loaded from a Salesforce controller, a list is given to store and I use a table.

How can I use a list en Javascript please?

 

Sorry if I use a bad language.

Hi All,

 

I am using some highchart.js file to plot a graph on visualforce page, if i use hard code value to graph in js code then it is working fine but, if i use VF remoting to bring data from apex controller to plot graph, VF remoating bringing data from apex controler but jquery not ploting graph at all.

I am pasting my VF page code. Please help me on this...

 

VF page code:

 

<apex:page controller="ChartController">

    <apex:includeScript value="{!URLFOR($Resource.jQuery)}"/>
    <apex:includeScript value="{!URLFOR($Resource.HighChartJS, '/js/highcharts.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.HighChartJS, '/js/modules/exporting.js')}"/>
    <script type="text/javascript">
            var accountNames = [];
            var optNums = [];
            var optProbs = [];
            $(function() {
                
                 //VF remoating start
                Visualforce.remoting.Manager.invokeAction(
                    '{!$RemoteAction.ChartController.getRemoteData}',
                    function(result, event){
                        if (event.status) {
                        
                            for(var i=0; i<result.length; i++)
                            {
                                accountNames.push(result[i].name);
                                optNums.push(result[i].data1);
                                optProbs.push(result[i].data2);
                            }
                            
                            alert(accountNames);
                        } 
                        else {
                            //document.getElementById("responseErrors").innerHTML = event.message;
                            alert(event.message);
                        }
                    }, 
                    {escape: true}
                );
            
                //VF remoating end
            });
            $.when.apply($, accountNames).done(function() {
                
                $('#container').highcharts({
                    chart: {
                        type: 'line'
                    },
                    title: {
                        text: 'Monthly Average Temperature'
                    },
                    subtitle: {
                        text: 'Source: WorldClimate.com'
                    },
                    xAxis: {
                        categories: accountNames
                        //categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
                    },
                    yAxis: {
                        title: {
                            text: 'Temperature (°C)'
                        }
                    },
                    tooltip: {
                        enabled: false,
                        formatter: function() {
                            return '<b>'+ this.series.name +'</b><br/>'+
                                this.x +': '+ this.y +'°C';
                        }
                    },
                    plotOptions: {
                        line: {
                            dataLabels: {
                                enabled: true
                            },
                            enableMouseTracking: false
                        }
                    },
                    series: [{
                        name: 'Tokyo',
                        //data&colon; optNums
                        data&colon; [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
                    }, {
                        name: 'London',
                        //data&colon; optProbs
                        data&colon; [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8] 
                    }]
                });
            });
<table width="100%">
    <tr>
 <td width="50%">
     <div id="container" style="width: 500px; height: 500px;"></div>
 </td>
    </tr>
</table>
</apex:page>

 

 

Hi,

My goal is to call a controller from a visualforce component using Javascript remoting and then to update the visualforce chart with the result.

 

The javascript remoting call works fine and I can see in the debug console that it receives the correct values as well. But how do I update the chart with this data?

 

Here's the javascript code. testCharts is my controller and getRemoteData is the RemoteAction method.

 

<script type="text/javascript">
function getOppChart() {
var year = '2013';

Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.testCharts.getRemoteData}',
year,
function(result, event) {
if (event.status) {
	// Actions here, update VF chart?
} else if (event.type === 'exception') {
	document.getElementById("responseErrors").innerHTML = event.message;
} else {
	document.getElementById("responseErrors").innerHTML = event.message;
}
}, 
{escape: true}
);
}
</script>

The visualforce chart component. The data attribute is required. How do I pass the result from the javascript function here? I would like to make this dynamic so that when I select a value in a picklist on the page a new call is made and the chart is refreshed. But as a start I'd just like to know how to get the result there. If I was just using a controller I would just put the method name in the data attribute, i.e. data="{!oppData}".

 

<apex:chart height="300" width="600" data="???">
	<apex:axis type="Numeric" position="left" fields="data,data2" 
	title="Total Order value" grid="true"/>
	<apex:axis type="Category" position="bottom" fields="name" 
	title="Month of the Year">
	</apex:axis>
	<apex:lineSeries axis="left" fill="true" xField="name" yField="data2"
	markerType="cross" markerSize="4" markerFill="#FF0000"/>
</apex:chart>

 The reason I am not using the Apex controller methods directly is because of three reasons.

- I hope the user will find this more reponsive

- I want to be able to rerender the charts

- I just want to make it work!!!

 

Can't find anything on the boards or google. Anyone got ideas?? Much appreciated!

 

Thanks / Niklas

 

I have a page that generates a receipt number depending on the type of payment selected.

 

<apex:page  standardcontroller="Policy__c" extensions="policyControllerIntA,RecordPolicy"  ">

<apex:form id="Policy">

        <apex:pageBlock >       
<apex:pageBlockSection>
  
  <div class="wrap3_1"> 
 <div class="wrap3">  
        <apex:pageblockSection columns="3">
            <apex:actionRegion >
                <apex:dynamicComponent componentValue="{!Section_3}"/>    
            </apex:actionRegion>  
                <apex:dynamicComponent componentValue="{!AddFile}"/>        
        </apex:pageblockSection>       
    </div>   

<apex:define name="wrap">
     <div class="wrap5">  
      <apex:actionRegion >  
        <apex:pageblockSection title="Recibos" id="paystubs" >
            <apex:dynamicComponent componentValue="{!Section_5}"/>
        </apex:pageblockSection>  
     </apex:actionRegion>          
    </div>        
 </apex:define>

</apex:pageBlockSection> 
        </apex:pageBlock>
</apex:form> 
 
</apex:page>

 extensions:

 

public with sharing class policyControllerIntA {
    public policyControllerIntA (ApexPages.StandardController con) { }

public Component.Apex.pageBlockSection  getSection_3(){


        Component.Apex.pageBlockSection s_three=new Component.Apex.pageBlockSection ();
        s_three.id='secthree';     
        s_three.collapsible=false;
        s_three.columns=4;

Component.Apex.SelectList fPayments= new Component.Apex.SelectList( multiselect = false, size = 1 );                  
       fPayments.expressions.value='{!fPayment}';
       fPayments.id='fPayments';
       fPayments.title='Forma de pago';
      
       
      Component.Apex.SelectOption so_Type_Payment= new Component.Apex.SelectOption();
      so_Type_Payment.itemLabel = 'Forma de Pago';
      so_Type_Payment.itemValue  = 'Forma de pago';
      
      
      Component.Apex.SelectOption so_Type_Payment1= new Component.Apex.SelectOption();
      so_Type_Payment1.itemLabel = 'Anual';
      so_Type_Payment1.itemValue  = 'Anual';      

      
      Component.Apex.SelectOption so_Type_Payment2= new Component.Apex.SelectOption();
      so_Type_Payment2.itemLabel = 'Semestral';
      so_Type_Payment2.itemValue = 'Semestral'; 
      
      Component.Apex.SelectOption so_Type_Payment3= new Component.Apex.SelectOption();
      so_Type_Payment3.itemLabel = 'Trimestral';
      so_Type_Payment3.itemValue = 'Trimestral';  
      
      Component.Apex.SelectOption so_Type_Payment4= new Component.Apex.SelectOption();
      so_Type_Payment4.itemLabel = 'Mensual';
      so_Type_Payment4.itemValue = 'Mensual';      
      
      
      Component.apex.actionSupport redPaystubs=new Component.apex.actionSupport();
      redPaystubs.event='onchange';
      Set<String> s1 = new Set<String>{'paystubs','fPayments'};
      redPaystubs.rerender=s1;
       
     
       
     if (fPayment=='Anual'||fPayment=='Semestral'||fPayment=='Trimestral'||fPaymentList=='Mensual'){       
       fPayments.childcomponents.add(so_Type_Payment1);       
       fPayments.childcomponents.add(so_Type_Payment2);       
       fPayments.childcomponents.add(so_Type_Payment3);
       fPayments.childcomponents.add(so_Type_Payment4);  
       fPayments.childcomponents.add(redPaystubs);  
    }else{
       fPayments.childcomponents.add(so_Type_Payment);
       fPayments.childcomponents.add(so_Type_Payment1);       
       fPayments.childcomponents.add(so_Type_Payment2);       
       fPayments.childcomponents.add(so_Type_Payment3);
       fPayments.childcomponents.add(so_Type_Payment4);  
       fPayments.childcomponents.add(redPaystubs);
    }

    s_three.childcomponents.add(niCompany);
    s_three.childcomponents.add(PDescription);
    s_three.childcomponents.add(fPayments);
  


return  s_three;

  }


public Component.Apex.pageBlockSection  getSection_5(){
integer asingNums;
integer Months;
        Component.Apex.pageBlockSection s_five=new Component.Apex.pageBlockSection ();
        s_five.id='sectfive';     
        s_five.collapsible=false;
        s_five.columns=12;
        
  
 
if (fPayment=='Anual'){Months=1;}
if (fPayment=='Semestral'){Months=2;}
if (fPayment=='Trimestral'){Months=4;}
if (fPayment=='Mensual'){Months=12;}

for(integer cont=0; cont<Months;cont++){
  Component.Apex.outputLabel nPaystub=new Component.Apex.outputLabel();
 
if(Months==1 || Months==2){
  nPaystub.value=cont + 1;
              if(cont==0){nPaystub.value=1;asingNums=1;}
                if(Months==2){ 
                              if(cont==0){nPaystub.value=1;asingNums=1;}
                              if(cont==1){nPaystub.value=2;asingNums=2;}
                                }

  }
else{
   if(Months==4 ){ 
              if(cont==0){nPaystub.value=1;asingNums=1;}
              if(cont==3){nPaystub.value=4;asingNums=4;}
              if(cont==1){nPaystub.value=3;asingNums=3;}
              if(cont==2){nPaystub.value=2;asingNums=2;}
            }
                else
                {
                   if(Months==12){
                                 if(cont==0){nPaystub.value=1;asingNums=1;}
                                 if(cont==11){nPaystub.value=12;asingNums=12;}
                                 if(cont==1){nPaystub.value=7;asingNums=7;}
                                 if(cont==2){nPaystub.value=2;asingNums=2;}
                                 if(cont==3){nPaystub.value=8;asingNums=8;}
                                 if(cont==4){nPaystub.value=3;asingNums=3;}
                                 if(cont==5){nPaystub.value=9;asingNums=9;}
                                 if(cont==6){nPaystub.value=4;asingNums=4;}
                                 if(cont==7){nPaystub.value=10;asingNums=10;}
                                 if(cont==8){nPaystub.value=5;asingNums=5;}
                                 if(cont==9){nPaystub.value=11;asingNums=11;}
                                 if(cont==10){nPaystub.value=6;asingNums=6;}
                               }                
                   } 
  }

 /*Component.Apex.inputTextarea....
 Component.Apex.inputTextarea....
 Component.Apex.inputTextarea....*/

return  s_five;

  } 

 and 

public with sharing class RecordPolicy{
    public RecordPolicy(ApexPages.StandardController con) { }

/************************* policy****************************/
 /*Public  String namecustomer{get; set;}
.
.
.*/
 Public  String fPayment{get; set;}
/*.
.  
 Public  Decimal pcommission{get; set;} */ 


 public integer  getnumPay(String fPayment){
  if (fPayment=='Forma de Pago'){return numberPay=1;}//----->
  if (fPayment=='Anual'||fPayment=='ANUAL'){return numberPay=1;}
  if (fPayment=='Semestral'||fPayment=='SEMESTRAL'){return numberPay=2;}
  if (fPayment=='Trimestral'||fPayment=='TRIMESTRAL'){return numberPay=4;}
  if (fPayment=='Mensual'||fPayment=='MENSUAL'){return numberPay=12;}
  return numberPay;
 }


Public PageReference save(){ 
/*
Policy__c p =new Policy__c (
*
*
fPayment__c=fPayment,
*
);

insert p;
parserId(p)
 
*
*/
createPaystub();
//
//
}


public void createPaystub() {
//
//

numPay=getnumPay(fPayment)
//
//

}

fPayment is a figure that interests me Policy__c saved, but it is still necessary for the rerender attribute on another extension. I need to access the contents of fPayment from policyControllerIntA.

Thanks

 

I am using a custom Site.

 

When a user forgets their password there is an option where I can reset the password then send it to their email address.  using this call which works fine:

 

Site.forgotPassword(username);

 


When the user tries to log in for the first time using their new password they are directed to the Site defined

Change Password VF  user interface/Page.  The force.com change password process is to populate the first apex:inputSecret field with the old password.  This old password is always wrong.

 

Site.changePassword(newPassword, verifyNewPassword, oldpassword);  

 

This call works as designed, it is telling me that the old password is wrong.  When I enter the correct password it works fine.  It is only when the ChangePassword VF page is displayed with the wrong old password is where I am having problems.

 

Is there a work around for getting the correct old password?  Can I make force.com give me the correct old password?

 

Thanks.

 

Tom

 

Hi I am new to visualforce but I am trying to write a controller to access and update a few custom fields. I added these fields to the User object. I have something like this.

 

public class CustomController {

 

    private User user;

 

    public CustomController(ApexPages.StandardController stdController) {

        this.user = (User)stdController.getRecord();

    }

 

 

     public void updateField() {

        String newCustomValue =Apexpages.currentPage().getParameters().get('newCustomValue');  

        user.CustomValue__c = newCustomValue;

        update user;

    }

}

 

My visual force page starts like:

<apex:page showHeader="false" standardController="User" extensions="CustomController">

 

<apex:form >
<apex:actionFunction name="updateField" action="{!updateField}" >
<apex:param id="newCustomValue" name="newCustomValue" value=""/>
</apex:actionFunction>
</apex:form>

 

 

But when I use this I get:

System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []

 

What am I missing?

 

I am trying to update my custom fields and have to available in my javascript rigth away.

Gauge Chart Scale is not showing Correctly

I need like 1 2 3 4 .... (scale =1)

But it is showing like 0,2,3,5,6,8....

 

===== VF Page ===============

<apex:page  Controller="GaugeChartController">
<apex:chart name="MyChart" height="300" width="450" animate="true" data="{!data}">
<apex:axis type="Gauge" position="gauge" title="Points" minimum="0" maximum="{!total }"/>
<apex:gaugeSeries dataField="size" donut="50" colorSet="#78c953,#ddd"/>
</apex:chart>
<script>
MyChart.on('beforeconfig', function(config) {
config.axes[0].margin=-10;
});
</script>
</apex:page>

 

======= Controller ==============

public class GaugeChartController {
public integer total {get;set;}

public List<gaugeData> getData() {
total =15;
List<gaugeData> data = new List<gaugeData>();
data.add(new gaugeData(10 + ' Opptys', 5));
system.debug('test $$$$ '+data);
return data;
}

public class gaugeData {
public String name { get; set; }
public Integer size { get; set; }

public gaugeData(String name, Integer data) {
this.name = name;
this.size = data;
}
}
}

 

Please correct me any thing wrong here. 

http://screencast.com/t/iI11VSFyCj4

Iam trying to use the Ext Js in visual force page.I have downloaded the ExtJs SDK 4.1.1a file.and iam uploading the file into static resources.As there is a size limit of 5 mb for each file in static resource i deleted some of  the files in Ext JS SDK 4.1.1a. I have kept some of the files like resources and all the js files into a folder extjs.zip and uploaded into static resource.But it is not working....

My code is as follows

<apex:page >
<link rel="Stylesheet" type="text/css" href="{!$Resource.ExtJS}/resources/css/ext-all.css" />
<script type="text/javascript" src="{!$Resource.ExtJS}/ext-all.js"></script>
<script type="text/javascript">

Ext.onReady(function(){

Ext.Msg.show({
title: 'Milton',
msg: 'Have you seen my stapler?',
buttons: {
yes: true,
no: true,
cancel: true
}
});

});

</script>
</apex:page>

please help me regarding the issue..

I am facing an issue with the Chatter:feed tag when I used it in HTML5 VF page. It doesn't allow me to add the link. Any thoughts? It hangs sometimes when i switch between link, post, file or etc...Anybody is facing the same issue...let me know your thoughts. appreciate your help!

We have a VisualForce page that needs to change it's appearance based on which parent page contains our page.

 

For example, we have a list of 10 phrases.  4 of them should appear on the Account page, 9 should appear on the Contact page, etc...

 

What we'd like to do is to have a filter string configured for each phrase, then compare the filter string against the name of the current page to determine which ones to display.

 

As near as I can tell, $CurrentPage returns the VisualForce page (not the page that contains the VisualForce view), so that doesn't seem like what we want.  Also, I imagine that this sort of filtering is best done in a controller, so we need to somehow get the current containing page name from the controller.

 

Any ideas?

In visual force charting how can we ensure that zero axis is always displayed and  the step values are rounded off to hundred. For certain reasons the value zero does not appear on the chart and thus making the graph hard to read, As you can see in the image the axis the values are not equally distributed on the positive and negative axis.

 

 

 

 

Thanks in advance

Regards

S.Aj

All -

 

So I think I just need direction on a place to start. I have been using google Charts and Visualizations to display complex scatter charts and line graphs. They way I have accomplished this is through the use of long text fields that contain up to 4K plot point in the X and 4000 in the Y field. This has allowed me to do some really great displays.

 

Now my user is asking me if I can layer my line graphs. Each line graph has it's own X and Y. To be clear, they rarely share a location on a graph (ie...X1 != X2 or Y1 != Y2). I have read and viewed many layered sales graphs that use the same year or month, but I do not have that commonality in mine. 

 

Is there a way to do a layered line graph with up to 6 lines where the only constant is my Max and Min? Can someone point me in the right direction? I would like to use VF Charts if at all possible.

 

Thank you in advance for any assistance you can provide.

 

JP

I have a commandButton to reprocess a set of filters and on clicking Go, the page redraws the charts and tables. When the page first loads I process and display the charts on the page with no problem. When I click Go, all the charts and tables display except the bar chart.

 

I get this error in my browser console:

Visualforce Chart: Error loading configuration for chart 'jid0jid29jid55jid56jid57jid64': Did not find required field 'ftRev,tgtRev' in data for chart 'jid0jid29jid55jid56jid57jid64'. Make sure field was queried and/or provided and has a value.

 

 

Here are extracts from the page code:

...

<apex:commandButton action="{!updatePage}" value="Go" id="theButtonCM"/>

...

<apex:outputPanel id="barchart">
<apex:pageBlock >
<apex:pageBlockTable value="{!perfSummList}" var="d" align="center">
<apex:column value="{!d.ftRev}" headerValue="FT"/>
<apex:column value="{!d.tgtRev}" headerValue="tgt"/>
<apex:column value="{!d.monthYYYYMM}" headerValue="mth"/>
<apex:column value="{!d.monthStr}" headerValue="mth"/>
</apex:pageBlockTable>
<b>ft revenue vs target</b><br/>
<apex:chart data="{!perfSummList}" height="300" width="500">
<apex:legend position="bottom" spacing="10" padding="2" font="10px Helvetica"/>
<apex:axis type="Category" position="bottom" fields="monthStr">
<apex:chartLabel />
</apex:axis>
<apex:axis type="Numeric" position="left" fields="tgtRev,ftRev" minimum="0" >
<apex:chartLabel />
</apex:axis>
<apex:barSeries axis="left" orientation="vertical" xField="monthStr" yField="ftRev,tgtRev" title="F+T,Target">
<apex:chartLabel />
</apex:barSeries>
</apex:chart>
</apex:pageBlock>
</apex:outputPanel>

 

The data in the table is from the same list and shows up just fine - the fields reported have values as surely the table would show if they did not. Something is going on under the hood for the charts and I can find out the issue here.

 

Any ideas?

 

 

The salesforce.com docs states remoting methods can take the following values as arugments, "primitives, collections, typed and generic sObjects, and user-defined Apex classes...". There appears to be an issue with generic sObject. Take a look at the following Visualforce page and the related remoting method.

 

<apex:page showHeader="true" sidebar="true" controller="RemotingSObject">
	<input value="Click Me" onclick="doRemote();" type="button"/>

	<script type="text/javascript">
		
		function doRemote(){
			var obj = {
				sobjectType: 'Account',
				Name: 'My new account'
			};

			//You can see there is a value of sbojectType set
			console.log(obj);

			Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemotingSObject.receiveSObject}', obj, function(result, event){
		        console.log(event);
		        console.log(result);
			});
		}

	</script>
</apex:page>

 The Class:

public with sharing class RemotingSObject {
	@RemoteAction
	public static void receiveSObject(SObject obj) {
		system.debug(obj); 
	}
}

 If you look in the browsers JavaScript console you will see this error message:

Visualforce Remoting Exception: Unable to determine SObject type: SObject. Please provide an 'id' or 'sobjectType' value.

 

Makes no sense as an sobjectType value is being supplied. Oddly enough if you provide an id value it works...but if you are trying to insert a new sObject you do not yet have an id value to use.

 

Any ideas on how to make this work? Bug?

 

Thanks,

Jason

 

Hello,

 

  I am using sencha and salesforce to build a mobile SDK. My app was working just fine for my part where I was able to query object from salesforce as well as insert. But after adding my co-worker's code into my project i get an error in the javascript console in my browser and I can longer naviaget to my page but only to his, but then when I go to his pages I can;t query any object. If I add my code to my co-worker it works just fine. Am i forgetting to configure something? The error is below.

 

  1. Visualforce Remoting Exception: No serializer found for class core.filemanager.FileBlobValue
  2. VFRemote.js:114
    1. $VFRM.Util.errorVFRemote.js:114
    2. (anonymous function)VFRemote.js:129
    3. a.Event.fireVFRemote.js:48
    4. a.Observable.fireEventVFRemote.js:43
    5. _Visualforce.Direct._Visualforce.extend.onProviderDataVFRemote.js:83
    6. a.Event.fireVFRemote.js:48
    7. a.Observable.fireEventVFRemote.js:43
    8. _Visualforce.direct.RemotingProvider._Visualforce.extend.onDataVFRemote.js:91
    9. _Visualforce.extend.handleResponseVFRemote.js:72
    10. (anonymous function)