Setting a initial value to a float field in Dynamics CRM 4.0

This question has suggested answer(s)

Hello,

I'm trying to calculate some fields on a quote OnLoad event. One of the fields is a float field. Everything is calculated well but when I open the quote for the first time there is a warning "You must enter a number between .....".

Is there a way to somehow initialize that field with a value. I suppose that this will solve my problem.

Thanks in advance

All Replies
  • Try something like in the form's OnLoad event:

    This will only fire when the first time the record is opened (being created) before it is saved the first time. 

    if (crmForm.FormType == 1) {
        var val = "1"; //Initial value
        crmForm.all.fieldname.DataValue = parseFloat(val);
    }
    

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

  • Hello,

    Are you still facing this issue ?

    Which update rollup you are on for CRM 4.0. Make sure that we are on latest update rollup if possible.

    Check this link too - community.dynamics.com/.../39315.aspx

    Thank You !

  • have you added the floats to the quote form or are they the default fields.

    If they are default fields then I would recommend installing the latest rollup because this might be a bug which has already been fixed

    has this issue been resolved

    Ben  Hosking

    If the my post helped you please mark my post as the suggested answer

    Hosk's Dynamic CRM Blog   |  @BenHosk |  Rockstar365

    Hosks CRM Dev YouTube Channel