• Dutchy
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I'm trying to recode the s-control in Mass Update Opportunity (Available on the Appexchange) to something that does the same trick for a custom object called Price.
 
I receive the following error (in IE6) executing the script:
 
Line: 434
Char: 1
Error: 'sfname' is null or not an object
Code: 0
 
The piece of code where the error is generated is the following:
 
function load_data(opps,cols) {
var _data = []; // actualy an array of arrays ( 2D array)
if (!opps) return; // we caught the error in get_opps()
for ( var i = 0; i
< opps.length; i++ ) {
_data[i] = [];
for (var j = 0; j< cols.length; j++ ) {
var daField = ( cols[j].sfname ? cols[j].sfname : cols[j].name );
if (daField==undefined) { daField = cols[j][1].sfname; }
var cel = opps[i].get(daField);
if ( cel && opps[i].getFieldDef(daField).type == 'date')
cel = cel.toString(); // turn dates into strings
_data[i].push( cel ); // fill the row
}
}
return _data;
}
 
 
When execuing the script, the turbo grid does not get filled with the data from the prices table. It does show the number of rows found in the top left corner. Can someone point me in the right direction or tell me where the fault can be? I'm completely lost . . .
 
Thanks,
 
:robotvery-happy:
  • March 19, 2007
  • Like
  • 0
I'm trying to recode the s-control in Mass Update Opportunity (Available on the Appexchange) to something that does the same trick for a custom object called Price.
 
I receive the following error (in IE6) executing the script:
 
Line: 434
Char: 1
Error: 'sfname' is null or not an object
Code: 0
 
The piece of code where the error is generated is the following:
 
function load_data(opps,cols) {
var _data = []; // actualy an array of arrays ( 2D array)
if (!opps) return; // we caught the error in get_opps()
for ( var i = 0; i
< opps.length; i++ ) {
_data[i] = [];
for (var j = 0; j< cols.length; j++ ) {
var daField = ( cols[j].sfname ? cols[j].sfname : cols[j].name );
if (daField==undefined) { daField = cols[j][1].sfname; }
var cel = opps[i].get(daField);
if ( cel && opps[i].getFieldDef(daField).type == 'date')
cel = cel.toString(); // turn dates into strings
_data[i].push( cel ); // fill the row
}
}
return _data;
}
 
 
When execuing the script, the turbo grid does not get filled with the data from the prices table. It does show the number of rows found in the top left corner. Can someone point me in the right direction or tell me where the fault can be? I'm completely lost . . .
 
Thanks,
 
:robotvery-happy:
  • March 19, 2007
  • Like
  • 0
Hi
I would like to create a custom field on the Account tab that calculates a customer's total expenditure. The only way I can think of doing this is to add all the Amounts for the Closed Won Opportunities related to the Account. When I try to create a formula in a custom field I only seem to be able to reference field on that tab (Accounts). Does anyone know how to made this work or suggest an alternaltive method?
 
We do not currently use Products so I would be interested to know if this gives us the functionality I'm after.
 
Thank you
 
Kerry
  • September 19, 2006
  • Like
  • 0