You need to sign in to do that
Don't have an account?
Delm
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
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
Pratibh
Migration tool is for inseting metadata in an ORG. Apex class wont be exectued when deploying it using Migration Tool.