I have a 1.0 client script where this code is exec...
# suitescript
n
I have a 1.0 client script where this code is executed in a FieldChanged function and i keep getting a maximum call stack exceeded error:
Copy code
function rentalAgreementHasChanged(type, name) {
    if(name != 'custbody_dc_next_bill_date') {
        nlapiSetFieldValue('custbody_dc_rental_aggree_bill_review', 'T');
        return;
    }
}
b
every field that doesnt have the id
custbody_dc_next_bill_date
sets
custbody_dc_rental_aggree_bill_review
that will of course trigger the field change for
custbody_dc_rental_aggree_bill_review
n
ahh basically what i want to do is if any field is changed except that one, check the box
b
its more you need to add another condition to that if statement
you probably want to keep the existing logic
n
Thanks! That was helpful.
This worked:
Copy code
function rentalAgreementHasChanged(type, name) {
    var billreview = nlapiGetFieldValue('custbody_dc_rental_aggree_bill_review');

    if(name != 'custbody_dc_next_bill_date' && billreview != 'T') {
        nlapiSetFieldValue('custbody_dc_rental_aggree_bill_review', 'T');
        return;
    }
}
checked to see if it is already checked. If so, stop else check
b
that looks like you made the
custbody_dc_rental_aggree_bill_review
hard to uncheck
n
fixed that too after i figured that out haha