Stop Qualify Lead RRS feed

  • Question

  • Hi!
    When qualifying a lead is necessary for another field has a certain value, otherwise qualify the action stops, but sends error:

        <Message> Unable to get value of property 'parentNode': object is null or undefined </ Message>
        <Line> 1 </ Line>
        <Function> </ Function>
        </ CallStack>
       </ ScriptErrorDetails>

    my code is this:

    function calls (executionObj)
         if (executionObj.getEventArgs (). getSaveMode () == 16)
                 value = Xrm.Page.getAttribute ('new_validarlead1'). getValue ();
                 if (valor! = 1) {
                     alert ("In order to qualify the Lead must be validated by the marketing area");
                     value = 0;
                      executionObj.getEventArgs (). preventDefault ();

    Heeelp please!
    Wednesday, November 6, 2013 4:53 PM

All replies

  • I have a very similar javascript function that fires to stop task completion. I compared code and the only thing I could find is this line "if(valor! = 1)" it looks like you need to have the line below. You have a space in the wrong spot. That's all I could find.

    if (value != 1)
    Not sure if you are aware of this but this website always helps me catch errors like this in my code. http://www.javascriptlint.com/online_lint.php

    Wednesday, November 6, 2013 8:54 PM