• Max_g
  • NEWBIE
  • 250 Points
  • Member since 2012

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 44
    Questions
  • 57
    Replies

I have a VF page that uses a custom object that has a master/detail relationship to account. 

 

I want to use this VF page as a button on the account page.  I need to account ID to drive my VF page.  If I convert from a standard controller to a custom controller will I be able to access this VF page from an account?

 

  • May 03, 2013
  • Like
  • 0

I need to build a URL to call a standard account page from the selected account on a VF page.  I am getting to my class method, but my build of the URL is not correct. 

How do I build that pagereference?

 

  • April 24, 2013
  • Like
  • 0

I have created a dashboard with 4 components.  Two of them are VF pages. 

 

I can see all 4 when I access the dashboard from the dashboard tab. 

When this is the default dashboard for my home tab, only the first 3 components are being displayed.  The 4th component is in the 2nd column.   Is there something I am missing on this setup?

 

 

  • April 19, 2013
  • Like
  • 0

I have not written any batch apex yet.  I want to update a field on a custom object that will then fire a trigger to rollup sales dollars to managers.  I have the rollup working properly when I manually update the controlling field, but I want to be able to schedule this job to run each day. 

 

Anyone have a good example of this type of code?

 

  • April 01, 2013
  • Like
  • 0

I want to be able to force a quicksave on my primary object when I access a VF page.  I am using the standard controller with an extension.  How do I code for this in my VF page so I don't have to select my refresh button to get the quicksave?

 

  • March 26, 2013
  • Like
  • 0

I need to add a total line for the sales amount on a VF page.

 

How do I do this when I am returning a list of accounts from my controller?

 

  • March 15, 2013
  • Like
  • 0

Currently my percent is showing as a decimal value.  How do I convert to a whole number before displaying?

 

 

<

apex:outputtextstyle="float:right" value="{0,number, ,000}">

             

<apex:paramvalue="{!Sales_History__c.Jan_Margin_Pct__c} "/>

             

</apex:outputtext>

  • March 13, 2013
  • Like
  • 0

I have a trigger that is working in the sandbox to insert the Forecast-quota records from my custom budget object.  When I attempted to run in production today, I am getting the above message.  I am running as admin in both environments.  The only difference is the volume of data I am loading.  Any suggestions?

 

 

  • March 05, 2013
  • Like
  • 0

Just realized that opportunity owners are not being updated when the account owner changes.  Our system of record is an external system, so all ownership changes are done through the ASI.  I found an old post indicating this has been happening since 2009.  Does anyone have an automated example of how to do this?  I can add all these changes to a trigger, but I thought salesforce automatically handled this for active opportunities.

 

  • February 26, 2013
  • Like
  • 0

I am trying to update or insert forecastingquota records using the following code.  There are currently no rows in the object.  How do I process this when my initial selection returns no rows?

Currently I am only trying to insert 1 record per user which will be for January of the corrent year.  If I can get that working, then I can replicate for the other 11 months of the year.

Any suggestions will be greately appreciated.

  

trigger CreateQuota onStart_Budget__c (afterupdate) {

//Limit the size of list by using Sets which do not contain duplicate elements 

start_Budget__c sb = [select Update_Quota__c fromStart_Budget__climit 1];

system.debug('SB Update Quota = ' + sb.Update_Quota__c);

If (sb.Update_Quota__c ==true){

string YearOfToday = String.valueOf(Date.today().year());

string havequota ='YES';

 set<id>  Userids = newset<id>();  

for(Start_Budget__c sbp : trigger.new)

  { 

 list <User> p = [Select Id, Profile_Prefix__c, isactive from user where Profile_Prefix__c = 'Sale'and isactive = true];

 system.debug('P = ' + p);

 for (Integer i=0; i<p.size(); i++) {

if(p[i].Id != nullUserIds.add(p[i].Id); 

  }   

  }

//Map will contain one User Id to one sum value 

system.debug('Userids = ' + Userids);

system.debug('Userid size = ' + userids.size());

map<id,decimal> UserMap = newmap<id,decimal> ();

map<id,decimal> UserMap1 = newmap<id,decimal> ();

 

for(AggregateResult q : [select User__c,

sum(Jan_Amount__c) JAN,

sum(Feb_Amount__c)FEB,

sum(Mar_Amount__c)MAR,

sum(Apr_Amount__c)APR,

sum(May_Amount__c)MAY,

sum(June_Amount__c)JUNE,

sum(July_Amount__c)JULY,

sum(Aug_Amount__c)AUG,

sum(Sep_Amount__c)SEP,

sum(Oct_Amount__c)OCT,

sum(Nov_Amount__c)NOV,

sum(Dec_Amount__c)DEC

fromBudget__cwhere User__c IN :UserIds and text_year__c =: YearofToday groupbyrollup(User__c)])

{  

system.debug('Q = ' + q);

    UserMap.put((Id)q.get('User__c'),(decimal)q.get('JAN'));

  UserMap1.put((Id)q.get('User__C'),(decimal)q.get('FEB'));

 

 

}

  

system.debug('Have Quota Value = ' + havequota);

  List<ForecastingQuota> UsersToUpdate = new List<ForecastingQuota>();

for(ForecastingQuota o : [Select Id, QuotaOwnerId, StartDate,Quotaamount  fromForecastingQuotawhere QuotaOwnerId IN :UserIds])

  {  

system.debug('O initial = ' +o);

 if(o == null) havequota = 'NO';

 system.debug('Have Quota Value after selection = ' + havequota);

      Decimal PaymentSum = UserMap.get(o.Id);

         o.Quotaamount = 0;   

    system.debug('Quota Amount = ' + PaymentSum);  

         o.Quotaamount = PaymentSum;

     string QuotaDate ='01' + '01' + YearofToday;

        o.StartDate = date.valueOf(Quotadate);

     system.debug('qdate = ' + o.StartDate);   

     UsersToUpdate.add(o); 

  system.debug('Users to update = ' + UsersToUpdate);

  system.debug('Quota  = ' + o);   

  }

 update UsersToUpdate;

 

sb.Update_Quota__c =false;

system.debug('CreateQuota = ' + sb.Update_Quota__c);

update sb;

}

 

}

  • February 22, 2013
  • Like
  • 0

Does anyone have examples of quota data?   

  • February 22, 2013
  • Like
  • 0

I have 4 master detail relationships on the Account object.  Is there a way to create a single custom report type that will access all 4 of those relationships?

 

  • February 07, 2013
  • Like
  • 0

The following trigger is giving me this error when I have more than 20 account records to update.  This is supposed to take a custom account field and get the corresponding parent salesforce id. 

Any code help will be appreciated. 

 

Here is the code:

trigger

GetParentBulked onAccount (beforeinsert, beforeupdate) {

list

<Account> listtoupdate = newlist<Account>();       

 

       

// For loop to iterate through all the queried Sales History records

         

 

list<string> JDE = newlist<string>();      

for(Account  h1: Trigger.new){

if (Trigger.isUpdate){   

if(h1.Parent_Account_JDE__c != Trigger.oldMap.get(h1.Id).Parent_Account_JDE__c){

JDE.add(h1.Parent_Account_JDE__c);

system.debug('H1 Cust = ' + h1.JDE_CUSTOMER__c);  

}

}

if(Trigger.isinsert){   

JDE.add(h1.Parent_Account_JDE__c);

system.debug('H1 Cust = ' + h1.JDE_CUSTOMER__c);  

}

}

 

Map<id,Account> a = newmap<id, account>([Select Id,Name,JDE_Customer__c,Parent_Account_JDE__c fromAccountwhere JDE_Customer__c in: JDE]) ;

 

for(Account h: Trigger.new){  

for(id A1 : a.keyset() ){  

    

account A2 = a.get(A1); 

system.debug('a =' + a);

if(a.size() > 0){  

 

 

system.debug('A2 = ' + a2);

 system.debug('A2 Parent = ' + a2.Parent_Account_JDE__c);

 system.debug('H Jde Cust =' + h.JDE_CUSTOMER__c);

 system.debug('H Parent = ' + h.Parent_Account_JDE__c);

 system.debug('H Parent ID =' + h.ParentId); 

 system.debug('A2 Id =' + a2.Id);

 system.debug('A2 JDE Customer = ' + a2.JDE_CUSTOMER__c);  

  

try{   

if(a2.JDE_CUSTOMER__c != null)                       

h.ParentId = A2.Id;

if(a2.JDE_CUSTOMER__c == null){

 if(h.ParentId != null)                       

h.ParentId =null;

}

system.debug('H Parent after Update = ' + h.ParentId);

system.debug('H = ' + h);             

  

}         

catch(Exception e)     

{       

system.debug('No Account Record ---- ' + e);     

}                           

                 

listtoupdate.add(h); 

}  

}                 

}      

}

  • January 24, 2013
  • Like
  • 0

Does anyone have experience doing delete using data loader command line?

 

I am getting the following error when I run my batch file:
2013-01-18 14:45:16,382 INFO  [main] controller.Controller initLog (Controller.java:367) - The log has been initialized
2013-01-18 14:45:16,382 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:78) - Loading process configuration from config file: c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\process-conf.xml
2013-01-18 14:45:16,413 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from file [c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\process-conf.xml]
2013-01-18 14:45:16,428 INFO  [main] core.CollectionFactory <clinit> (CollectionFactory.java:66) - JDK 1.4+ collections available
2013-01-18 14:45:16,444 INFO  [main] core.CollectionFactory <clinit> (CollectionFactory.java:71) - Commons Collections 3.x available
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] controller.Controller initConfig (Controller.java:328) - The controller config has been initialized
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] process.ProcessRunner run (ProcessRunner.java:90) - Initializing process engine
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] process.ProcessRunner run (ProcessRunner.java:93) - Loading parameters
2013-01-18 14:45:17,021 INFO  [OpenOrderDelete] config.LastRun load (LastRun.java:96) - Last run info will be saved in file: c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\OpenOrderDelete_lastRun.properties
2013-01-18 14:45:17,037 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:211) - Unable to run process OpenOrderDelete
java.lang.RuntimeException: java.lang.IllegalArgumentException: No enum const class com.salesforce.dataloader.action.OperationInfo.Delete
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:136)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:74)
 at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:226)
Caused by: java.lang.IllegalArgumentException: No enum const class com.salesforce.dataloader.action.OperationInfo.Delete
 at java.lang.Enum.valueOf(Enum.java:192)
 at com.salesforce.dataloader.config.Config.getEnum(Config.java:441)
 at com.salesforce.dataloader.config.Config.getOperationInfo(Config.java:981)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:97)
 ... 2 more

 

 

  • January 18, 2013
  • Like
  • 0

I am having an issue getting my command line data loader to function.  I am using date loader 23.0

 

I have encrypted the password and security token as outlined in the cheatsheet for 9.0. 

 

I have verified that I can log onto data loader using the userid, password and security token, so I know the user is not locked out.

 

Here is my error message:

 

java.lang.RuntimeException: Invalid username, password, security token; or user locked out.
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:74)
 at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:226)
Caused by: [LoginFault [ApiFault  exceptionCode='INVALID_LOGIN'
 exceptionMessage='Invalid username, password, security token; or user locked out.'
]]

 

Here is the password portion of my code:

<entry key="sfdc.password" value="41683bf7a6a116b7d92ce4e857e7b510"/>
                <entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\salesforce.com\Apex Data Loader 23.0\conf\Key.txt" />

Any ideas?

 

 

 

 

 

  • January 17, 2013
  • Like
  • 0

I am overriding the Log a Call button on activity history to a VF page.  I am not getting the ownerid to set the default.  What parameter can I access to generate this? 

 

Here is the code for my VF controller extension:

 

public withsharingclass LACCtrlExtension {

publicTask task {get; set;}

 

Public   string newname = Apexpages.currentpage().getparameters().get('id2');

   

public LACCtrlExtension(apexPages.StandardController controller){

           

this.task = (Task)controller.getRecord();

           

system.debug('Task Record is = ' + this.task);

         

           

this.task.subject = ApexPages.currentPage().getParameters().get('tsk5');

 task.Ownerid = newname;

                      

           

this.task.type = 'Call';

           

this.task.status = 'Completed';

           

this.task.activitydate = Date.today();

           

this.task.whoid = Null;

           

system.debug('Current Page = ' + ApexPAges.currentPage());

           

           

system.debug('WhatId = ' + task.whatId);

           

system.debug('Subject = ' + task.Subject);

           

system.debug('Assigned to = ' + task.OwnerId);

    }

 

}

  • January 07, 2013
  • Like
  • 0

Having an issue with this extension code giving me:

 Save error: Invalid type: ApexPages.StandardController LACCtrlExtension.cls /natenv.sandbox/src/classes line 4 Force.com save problem

 

Here is the code.

public with sharing class LACCtrlExtension {

public Task task {get; set;}

 

public LACCtrlExtension(ApexPages.StandardController controller) {

           

this.task = (Task)controller.getRecord();

           

this.task.whatId = ApexPages.currentPage().getParameters().get('what_id');   

           

this.task.subject = ApexPages.currentPage().getParameters().get('tsk5');

           

this.task.type = 'Call';

           

this.task.status = 'Completed';

           

this.task.activitydate = Date.today();

    }

 

}

  • January 04, 2013
  • Like
  • 0

The following code is producing the above error message. 

 

What am I doing wrong with this?

 

trigger GetParentBulked onAccount (beforeinsert, beforeupdate) {

list <Account> listtoupdate = newlist<Account>();       

 

       

// For loop to iterate through all the queried Sales History records

         

 

list<string> JDE = newlist<string>();      

for (Account  h1: Trigger.new){     

JDE.add(h1.Parent_Account_JDE__c);  } 

//system.debug('JDE Cust = ' + JDE);      

Map<id,Account> a = newmap<id, account>([Select Id,Name,JDE_Customer__c,Parent_Account_JDE__c fromAccountwhere JDE_Customer__c in: JDE]) ;

// system.debug(' Account Map = ' + a); 

for(Account h: Trigger.new){       

for(id A1 : a.keyset() ){          

account A2 = a. get(A1);           

if(A2.JDE_Customer__c == h.JDE_Customer__c ){              

              

// h.ParentId = A2.id;    

try

{                             

h.ParentId = A2.Id;              

//system.debug('Account = ' + a); 

}         

catch (Exception e)     

{       

system.debug('No Account Record ---- ' + e);     

}                           

// system.debug('Accounts with Parents = ' + h);                 

listtoupdate.add(h);                      

}      

}

      

}     

   }

  • January 02, 2013
  • Like
  • 0

I am working on year end processes and need to delete some zero records from a custom object.  I have written a trigger that will fire when a field on a custom object is set to YES for delete zero records.  The trigger appears to be working correctly until ready to delete the record.  I am getting the following error.

EXCEPTION_THROWN|[28]|System.DmlException: Delete failed. First exception on row 0 with id a0AJ0000005AY6fMAG; first error: ENTITY_IS_DELETED, entity is deleted: []
09:37:48.247 (1247331000)|FATAL_ERROR|System.DmlException: Delete failed. First exception on row 0 with id a0AJ0000005AY6fMAG; first error: ENTITY_IS_DELETED, entity is deleted: []

 

Here is the Trigger code:

 

trigger DeleteZeroOrders onStart_Budget__c (afterupdate) {

 

if(trigger.isUpdate)

{   

Start_Budget__c sb = [Select Delete_Zero_Open_Orders__c fromStart_Budget__c];

system.debug('Delete Open Orders = ' + sb.Delete_Zero_Open_Orders__c);

  

    If(sb.Delete_Zero_Open_Orders__c == 'Yes'){

 

 

 

 

List<Open_Order__c> OrdersToDelete = new List<Open_Order__c>();  

 

for(Open_Order__c o : [Select Id,Current_Year_YTD__c,Future_Year_YTD__c fromOpen_Order__c])

  {   

   

system.debug('Selected Open Orders = ' + o);

   

if(o.Current_Year_YTD__c == 0){

 

    IF(o.Future_Year_YTD__c == 0){

     

     OrdersToDelete.add(o); 

  

system.debug('Orders to Delete = ' + OrdersToDelete);    

  }

    }

    If(OrdersToDelete.size() != 0)

 

Delete OrdersToDelete;

 

  }

    }

}

}

  • December 28, 2012
  • Like
  • 0

How can I conditionally control a trigger executing when I am only updating a rollup summary field?

 

Causing me "Too many script statements" error.

  • December 20, 2012
  • Like
  • 0

I have a VF page that uses a custom object that has a master/detail relationship to account. 

 

I want to use this VF page as a button on the account page.  I need to account ID to drive my VF page.  If I convert from a standard controller to a custom controller will I be able to access this VF page from an account?

 

  • May 03, 2013
  • Like
  • 0

I need to build a URL to call a standard account page from the selected account on a VF page.  I am getting to my class method, but my build of the URL is not correct. 

How do I build that pagereference?

 

  • April 24, 2013
  • Like
  • 0

I want to be able to force a quicksave on my primary object when I access a VF page.  I am using the standard controller with an extension.  How do I code for this in my VF page so I don't have to select my refresh button to get the quicksave?

 

  • March 26, 2013
  • Like
  • 0

Currently my percent is showing as a decimal value.  How do I convert to a whole number before displaying?

 

 

<

apex:outputtextstyle="float:right" value="{0,number, ,000}">

             

<apex:paramvalue="{!Sales_History__c.Jan_Margin_Pct__c} "/>

             

</apex:outputtext>

  • March 13, 2013
  • Like
  • 0

Hi 

I am trying to login to dataloader. I gave my username password followed by security token but its saying

'Failed to send request to https://login.salesforce.com/services/Soap/u/27.0'. I checked even in the personal setting login history too, but there is no error showed. My username is my outlook password , where my outlook is in citrix. 

 

Please let me know what this error mean and y with a solution.

 

Thank you,

Jyothi

  • March 13, 2013
  • Like
  • 0

I have a trigger that is working in the sandbox to insert the Forecast-quota records from my custom budget object.  When I attempted to run in production today, I am getting the above message.  I am running as admin in both environments.  The only difference is the volume of data I am loading.  Any suggestions?

 

 

  • March 05, 2013
  • Like
  • 0

I am trying to update or insert forecastingquota records using the following code.  There are currently no rows in the object.  How do I process this when my initial selection returns no rows?

Currently I am only trying to insert 1 record per user which will be for January of the corrent year.  If I can get that working, then I can replicate for the other 11 months of the year.

Any suggestions will be greately appreciated.

  

trigger CreateQuota onStart_Budget__c (afterupdate) {

//Limit the size of list by using Sets which do not contain duplicate elements 

start_Budget__c sb = [select Update_Quota__c fromStart_Budget__climit 1];

system.debug('SB Update Quota = ' + sb.Update_Quota__c);

If (sb.Update_Quota__c ==true){

string YearOfToday = String.valueOf(Date.today().year());

string havequota ='YES';

 set<id>  Userids = newset<id>();  

for(Start_Budget__c sbp : trigger.new)

  { 

 list <User> p = [Select Id, Profile_Prefix__c, isactive from user where Profile_Prefix__c = 'Sale'and isactive = true];

 system.debug('P = ' + p);

 for (Integer i=0; i<p.size(); i++) {

if(p[i].Id != nullUserIds.add(p[i].Id); 

  }   

  }

//Map will contain one User Id to one sum value 

system.debug('Userids = ' + Userids);

system.debug('Userid size = ' + userids.size());

map<id,decimal> UserMap = newmap<id,decimal> ();

map<id,decimal> UserMap1 = newmap<id,decimal> ();

 

for(AggregateResult q : [select User__c,

sum(Jan_Amount__c) JAN,

sum(Feb_Amount__c)FEB,

sum(Mar_Amount__c)MAR,

sum(Apr_Amount__c)APR,

sum(May_Amount__c)MAY,

sum(June_Amount__c)JUNE,

sum(July_Amount__c)JULY,

sum(Aug_Amount__c)AUG,

sum(Sep_Amount__c)SEP,

sum(Oct_Amount__c)OCT,

sum(Nov_Amount__c)NOV,

sum(Dec_Amount__c)DEC

fromBudget__cwhere User__c IN :UserIds and text_year__c =: YearofToday groupbyrollup(User__c)])

{  

system.debug('Q = ' + q);

    UserMap.put((Id)q.get('User__c'),(decimal)q.get('JAN'));

  UserMap1.put((Id)q.get('User__C'),(decimal)q.get('FEB'));

 

 

}

  

system.debug('Have Quota Value = ' + havequota);

  List<ForecastingQuota> UsersToUpdate = new List<ForecastingQuota>();

for(ForecastingQuota o : [Select Id, QuotaOwnerId, StartDate,Quotaamount  fromForecastingQuotawhere QuotaOwnerId IN :UserIds])

  {  

system.debug('O initial = ' +o);

 if(o == null) havequota = 'NO';

 system.debug('Have Quota Value after selection = ' + havequota);

      Decimal PaymentSum = UserMap.get(o.Id);

         o.Quotaamount = 0;   

    system.debug('Quota Amount = ' + PaymentSum);  

         o.Quotaamount = PaymentSum;

     string QuotaDate ='01' + '01' + YearofToday;

        o.StartDate = date.valueOf(Quotadate);

     system.debug('qdate = ' + o.StartDate);   

     UsersToUpdate.add(o); 

  system.debug('Users to update = ' + UsersToUpdate);

  system.debug('Quota  = ' + o);   

  }

 update UsersToUpdate;

 

sb.Update_Quota__c =false;

system.debug('CreateQuota = ' + sb.Update_Quota__c);

update sb;

}

 

}

  • February 22, 2013
  • Like
  • 0

Does anyone have examples of quota data?   

  • February 22, 2013
  • Like
  • 0

I have 4 master detail relationships on the Account object.  Is there a way to create a single custom report type that will access all 4 of those relationships?

 

  • February 07, 2013
  • Like
  • 0

The following trigger is giving me this error when I have more than 20 account records to update.  This is supposed to take a custom account field and get the corresponding parent salesforce id. 

Any code help will be appreciated. 

 

Here is the code:

trigger

GetParentBulked onAccount (beforeinsert, beforeupdate) {

list

<Account> listtoupdate = newlist<Account>();       

 

       

// For loop to iterate through all the queried Sales History records

         

 

list<string> JDE = newlist<string>();      

for(Account  h1: Trigger.new){

if (Trigger.isUpdate){   

if(h1.Parent_Account_JDE__c != Trigger.oldMap.get(h1.Id).Parent_Account_JDE__c){

JDE.add(h1.Parent_Account_JDE__c);

system.debug('H1 Cust = ' + h1.JDE_CUSTOMER__c);  

}

}

if(Trigger.isinsert){   

JDE.add(h1.Parent_Account_JDE__c);

system.debug('H1 Cust = ' + h1.JDE_CUSTOMER__c);  

}

}

 

Map<id,Account> a = newmap<id, account>([Select Id,Name,JDE_Customer__c,Parent_Account_JDE__c fromAccountwhere JDE_Customer__c in: JDE]) ;

 

for(Account h: Trigger.new){  

for(id A1 : a.keyset() ){  

    

account A2 = a.get(A1); 

system.debug('a =' + a);

if(a.size() > 0){  

 

 

system.debug('A2 = ' + a2);

 system.debug('A2 Parent = ' + a2.Parent_Account_JDE__c);

 system.debug('H Jde Cust =' + h.JDE_CUSTOMER__c);

 system.debug('H Parent = ' + h.Parent_Account_JDE__c);

 system.debug('H Parent ID =' + h.ParentId); 

 system.debug('A2 Id =' + a2.Id);

 system.debug('A2 JDE Customer = ' + a2.JDE_CUSTOMER__c);  

  

try{   

if(a2.JDE_CUSTOMER__c != null)                       

h.ParentId = A2.Id;

if(a2.JDE_CUSTOMER__c == null){

 if(h.ParentId != null)                       

h.ParentId =null;

}

system.debug('H Parent after Update = ' + h.ParentId);

system.debug('H = ' + h);             

  

}         

catch(Exception e)     

{       

system.debug('No Account Record ---- ' + e);     

}                           

                 

listtoupdate.add(h); 

}  

}                 

}      

}

  • January 24, 2013
  • Like
  • 0

Does anyone have experience doing delete using data loader command line?

 

I am getting the following error when I run my batch file:
2013-01-18 14:45:16,382 INFO  [main] controller.Controller initLog (Controller.java:367) - The log has been initialized
2013-01-18 14:45:16,382 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:78) - Loading process configuration from config file: c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\process-conf.xml
2013-01-18 14:45:16,413 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from file [c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\process-conf.xml]
2013-01-18 14:45:16,428 INFO  [main] core.CollectionFactory <clinit> (CollectionFactory.java:66) - JDK 1.4+ collections available
2013-01-18 14:45:16,444 INFO  [main] core.CollectionFactory <clinit> (CollectionFactory.java:71) - Commons Collections 3.x available
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] controller.Controller initConfig (Controller.java:328) - The controller config has been initialized
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] process.ProcessRunner run (ProcessRunner.java:90) - Initializing process engine
2013-01-18 14:45:16,475 INFO  [OpenOrderDelete] process.ProcessRunner run (ProcessRunner.java:93) - Loading parameters
2013-01-18 14:45:17,021 INFO  [OpenOrderDelete] config.LastRun load (LastRun.java:96) - Last run info will be saved in file: c:\program files (x86)\salesforce.com\apex data loader 23.0\conf\OpenOrderDelete_lastRun.properties
2013-01-18 14:45:17,037 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:211) - Unable to run process OpenOrderDelete
java.lang.RuntimeException: java.lang.IllegalArgumentException: No enum const class com.salesforce.dataloader.action.OperationInfo.Delete
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:136)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:74)
 at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:226)
Caused by: java.lang.IllegalArgumentException: No enum const class com.salesforce.dataloader.action.OperationInfo.Delete
 at java.lang.Enum.valueOf(Enum.java:192)
 at com.salesforce.dataloader.config.Config.getEnum(Config.java:441)
 at com.salesforce.dataloader.config.Config.getOperationInfo(Config.java:981)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:97)
 ... 2 more

 

 

  • January 18, 2013
  • Like
  • 0

I am having an issue getting my command line data loader to function.  I am using date loader 23.0

 

I have encrypted the password and security token as outlined in the cheatsheet for 9.0. 

 

I have verified that I can log onto data loader using the userid, password and security token, so I know the user is not locked out.

 

Here is my error message:

 

java.lang.RuntimeException: Invalid username, password, security token; or user locked out.
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
 at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:74)
 at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:226)
Caused by: [LoginFault [ApiFault  exceptionCode='INVALID_LOGIN'
 exceptionMessage='Invalid username, password, security token; or user locked out.'
]]

 

Here is the password portion of my code:

<entry key="sfdc.password" value="41683bf7a6a116b7d92ce4e857e7b510"/>
                <entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\salesforce.com\Apex Data Loader 23.0\conf\Key.txt" />

Any ideas?

 

 

 

 

 

  • January 17, 2013
  • Like
  • 0