locked
Contract Lines field update... RRS feed

  • Question

  • OK, this is driving me nuts!  I have added two new fields to the contract Lines form called "days" and "daysremaining". I simply want to update the totalallotments and allotmentsremaining fields which are values entered in minutes into the equivalent number of days ie divide by 1440 for both of these fields should an Onchange occur in field totalallotments. Therefore I put ithe following 2 lines in Onchange event on totalallotments:

    crmForm.all.new_pav_days.DataValue = crmForm.all.totalallotments.DataValue/1440;

    crmForm.all.new_pav_daysremaining.DataValue = crmForm.all.allotmentsremaining.DataValue/1440;

    The first line works fine but the second line does not update the all.new_pav_daysremaining field.

    Any suggestions?

    Thanks

     

     


    BM
    Tuesday, April 12, 2011 12:29 PM

Answers

  • Thanks. However, I did that because thats the only way to reduce the remaining allotments.

    Bill


    BM
    • Marked as answer by BillyBoy9991 Wednesday, April 13, 2011 12:28 PM
    Tuesday, April 12, 2011 4:28 PM

All replies

  • Put an alert

    alert(crmForm.all.allotmentsremaining.DataValue/1440);


    Regards Faisal

    Tuesday, April 12, 2011 1:30 PM
  • OK thanks, getting there. I ended up puting an Onchange on totalallocations to update new_pav_days and that worked OK. The only way I could get new_pavdaysremaining to update was to put the calculation on the form onload. So, thet works great. I also put a Forcesubmit on form save. The reason for this was because I added these 2 columns to the Contracts Line view and these values were showing in the view correctly. However, on raising a Case to use time against the contract line, the Remaining Days field does not get updated. Why is that?

    Bill

     


    BM
    Tuesday, April 12, 2011 4:09 PM
  • Just to add, the Case does reduce the Remaining Allotment AND the Remaining Days on the form but NOT in the Contrcat Line view - very odd.
    BM
    Tuesday, April 12, 2011 4:14 PM
  • Try after resolving the case.
    Regards Faisal
    Tuesday, April 12, 2011 4:19 PM
  • Thanks. However, I did that because thats the only way to reduce the remaining allotments.

    Bill


    BM
    • Marked as answer by BillyBoy9991 Wednesday, April 13, 2011 12:28 PM
    Tuesday, April 12, 2011 4:28 PM