• schndt
  • NEWBIE
  • 10 Points
  • Member since 2016

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

Hi,
I am not able to figure why the JS remoting example shown at the following location would ever work correctly.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_example.htm

Shouldn't the merge field syntax {!$RemoteAction.AccountRemoter.getAccount} _not_ be understood by Javascript?

For example,when I amend the examples as follows :

Change:
Visualforce.remoting.Manager.invokeAction(
   '{!$RemoteAction.AccountRemoter.getAccount}',
   accountName,
   function, {...});

To:

AccountRemoter.getAccount(
   accountName,
   function, {...});

It works perfectly as expected.

​What am I missing?

Hi,
I am not able to figure why the JS remoting example shown at the following location would ever work correctly.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_example.htm

Shouldn't the merge field syntax {!$RemoteAction.AccountRemoter.getAccount} _not_ be understood by Javascript?

For example,when I amend the examples as follows :

Change:
Visualforce.remoting.Manager.invokeAction(
   '{!$RemoteAction.AccountRemoter.getAccount}',
   accountName,
   function, {...});

To:

AccountRemoter.getAccount(
   accountName,
   function, {...});

It works perfectly as expected.

​What am I missing?