• hwdavid
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies

I am connecting my google appenigne app to salesforce (in python) and every so often performing a query to get account details from salesforce. I can login to salesforce via the api.

 

login_result = sforce.login(username, password)

 

and I can perform my query:

 

query_result = sforce.query(......)

 

But I am wondering how I check if my session is still valid? How do I know if it has expried? I noticed a isConnected method in the PtyhonClient but I don't really think that is it. What am I missing? 

 

Thanks

  • September 26, 2013
  • Like
  • 0

I am using API 28 but when I try to use sforce.interaction.searchAndGetScreenPopURL from my viusalforce page I get an error indicating the object has no such method. Why would that be? is it not in API 28?

 

<script src="/support/api/28.0/interaction.js"></script>

I have added a custom field to the User object and I want to update that object and have it available in my javascript.  As of now I can get the object but once I update it the visualforce page still gets the old value. I suspect my problem is related to my initial query not being refreshed but rerunning it has no effect. Here is what I have thus far.

 

public class CustomController {

 

  public User user {get; set;}

 

  public CustomController(ApexPages.StandardController stdController) {

     this.user = [select Id, CustomField__c from User where Id=:UserInfo.getUserId() limit 1];
  }

 

  

  public void updateUser() {
    update user;
  }

 

}

 


<apex:page showHeader="false" controller="CustomController">

 

<apex:form >

<apex:actionFunction name="updateCustomField" action="{!updateUser}" rerender="tokenBlock" >
<apex:param id="customField" name="customField" value="" assignTo="{!User.CustomField__c}"/>

</apex:actionFunction>
</apex:form>

 

:

:

 updateCustomField('new value');

 

So this all works but if I try to get that value via '{!$user.CustomField__c}' I get the old value... What am I missing.

 

Thanks

 

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.

Hi,
Getting the following error when tried to access apex class of installed package (managed) using openCti method 'runApex', when my test organisation has an namespace defined in it.
Error "Cannot Load Apex Class: namespace.classname"

Scenario1 :
-> Test organisation contains no namespace.
-> Installed managed package.
runApex('namespace.classname','methodname',paramString) works fine

Scenario 2 :
-> Test organisation contains an namespace 'testnamespace'.
-> Installed managed package.
runApex('namespace.classname','methodname',paramString) doesn't work.


What could be the possible reason for error ?


Thanks
Bhindusaran.v

Invoking Apex class using RunApex API.

 

 

We are able to involke the ApexClasses created by the Administrator on the development Org

 

We are NOT able to invoke the Apex Classes installed from a ManagedPackage on the same Org.

 

Does RunApex API support invoking classes installed from a ManagedPackage?

 

I am using API 28 but when I try to use sforce.interaction.searchAndGetScreenPopURL from my viusalforce page I get an error indicating the object has no such method. Why would that be? is it not in API 28?

 

<script src="/support/api/28.0/interaction.js"></script>

I have added a custom field to the User object and I want to update that object and have it available in my javascript.  As of now I can get the object but once I update it the visualforce page still gets the old value. I suspect my problem is related to my initial query not being refreshed but rerunning it has no effect. Here is what I have thus far.

 

public class CustomController {

 

  public User user {get; set;}

 

  public CustomController(ApexPages.StandardController stdController) {

     this.user = [select Id, CustomField__c from User where Id=:UserInfo.getUserId() limit 1];
  }

 

  

  public void updateUser() {
    update user;
  }

 

}

 


<apex:page showHeader="false" controller="CustomController">

 

<apex:form >

<apex:actionFunction name="updateCustomField" action="{!updateUser}" rerender="tokenBlock" >
<apex:param id="customField" name="customField" value="" assignTo="{!User.CustomField__c}"/>

</apex:actionFunction>
</apex:form>

 

:

:

 updateCustomField('new value');

 

So this all works but if I try to get that value via '{!$user.CustomField__c}' I get the old value... What am I missing.

 

Thanks

 

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.

Hi All,

I am trying to Implement the Open CTI using visualforce pages and it doen't seems working.

I refer the documentation: http://wiki.developerforce.com/page/Open_CTI

I installed the package on on my dev account but that demo call interface doesn't seems working, when I call any of the Open CTI standard methods nothing happens for example if I call :

sforce.interaction.isInConsole(mycallback); it never comes back to my callback method.

If I make dummy html page on my machine and define that as my Open CTI interface and call this js

on some button click got response.

 

I try googling lot on this but with no result is anybody have any idea on making this work using the visual force page.

 

 

Thanks