+ Start a Discussion
Naresh.TNaresh.T 

Problem in Craeting Revenue schedule

Hi,

I am trying to create revenueschedule using perl.
But I am getting the following errors.

Use of uninitialized value in hash element at WWW/Salesforce/Simple.pm line 65.
Use of uninitialized value in concatenation (.) or string at WWW/Salesforce/Simple.pm line 73.
Element 'sfons:HASH(0x93b2394)' can't be allowed in valid XML message. Died

Code:
my $result_oppshed = $sforce->do_query("select  Quantity,ScheduleDate,Revenue from  OpportunityLineItemSchedule where OpportunityLineItemId='OpportunityLineItemId' " );
   foreach  $row_oppshed(@$result_oppshed) 
    {

     print "\n  $row_oppshed->{ScheduleDate} $row_oppshed->{Revenue} \n" ;
     tie my %opplshed, 'Tie::Hash::Indexed';
     %opplshed = {
         type => 'OpportunityLineItemSchedule',
         OpportunityLineItemId => 'OpportunityLineItemId',
         Quantity => $row_oppshed->{Quantity},
         ScheduleDate => $row_oppshed->{ScheduleDate},
         Type => 'Revenue',
         Revenue => $row_oppshed->{Revenue}
        };
       
       my $result_oppshed1 = $sforce->create(%opplshed);
       
       if ($result_oppshed1->result->{"success"} eq "false") {
       print $result_oppshed1->result->{errors}->{message} . "\n";

    }
   }

 Please let me know if I miss anything in the code.

Any help would be very much appreciated.

Thanks,
Naresh.T