function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DelmDelm 

Migration Tool Problem - Build Successful but not inserting the records

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
PratibhPratibh
Migration tool is for inseting metadata in an ORG. Apex class wont be exectued when deploying it using Migration Tool.