• Delm
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi,

 

Is it possible to add a javascript on the standard list controller without affecting the standard list page lay-out?

 

I want to perform some javascript function upon clicking the name of the record before the "detail page view" open.

 

Thanks for the help.

 

Regards,

Delm

  • August 26, 2009
  • Like
  • 0

Hi,

I am trying to create a program in visualforce with ajax tool. The program will update the record before viewing its details. Here is my sample code:

<apex:page standardController="ObjectTest__c" >
<script src="/soap/ajax/15.0/connecton.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
sforce.connection.sessionId = "{!$Api.Session_ID}";
var u = new sforce.SObject("ObjectTest__c");
u.Id = "{!ObjectTest__c.Id}";
u.Field_To_Update__c = 'Hello';
result = sforce.connection.update([u]);
</script>
<apex:detail relatedList="true" />

</apex:page>

The problem is, although the update has been made, it display the un-updated data. I have to view again the page inorder to see the update.

Question, how can I achieve displaying the detail page with the updated data without reloading the page?

  • August 24, 2009
  • Like
  • 0
Hi,

I am trying to insert a new record to my custom object using the Migration Tool. When deploying my code, the Ant says BUILD SUCCESSFUL however, no record has been added. Below is my code:

==================[build.xml]=========================

"
<project name="Test on TestFund" basedir="." xmlns:sf="antlib:com.salesforce">
   <property file="build.properties"/>
   <property environment="env"/>
    <target name="testInsert">
        <sf:deploy
            username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            deployRoot="InsertTest"/>
    </target>
</project>
"


=================[package.xml]=======================

"
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>lTestFund</members>
        <name>ApexClass</name>
    </types>
    <version>16.0</version>
</Package>
"


=================[lTestFund.cls]=========================

public class lTestFund {

public void loadFund() {
TestFund__c fnd = new TestFund__c(Fund_Name__c='test 2 fund',ISIN__c='KYG000012321');
insert fnd;
}

}

=================[lTestFund.cls-meta.xml]=========================

"
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>lTestFund</members>
        <name>ApexClass</name>
    </types>
    <version>16.0</version>
</Package>
"



Can anyone point to me where causes for not inserting new record?

Thank you.

Regards,
Dellm
Message Edited by Delm on 07-02-2009 11:51 PM
  • July 03, 2009
  • Like
  • 0

The code renders the page perfectly in the page editor, referencing all the images correctly. However, when its published to the Internet, the code doesn't find any of the images. What could be the cause of this?