Lead / Qualify - can it be cancelled?

I am >   CRM 2011 RU13 On-Premise
I'm trying to cancel the Lead / Qualify step but am receiving an error. All code seems to work
properly except the "ExecutionObj.getEventArgs().preventDefault();" statement that will cancel this step.
Code & error follow.
Thanks in advance for your assistance
function Form_onsave(ExecutionObj)
var eventmode=ExecutionObj.getEventArgs().getSaveMode();
 if (ocbuItem == "Residential Sales")
      if (eventmode == 1 || eventmode == 2)
//  save = 1 ,  save & close = 2
           if(Xrm.Page.getAttribute("new_resleaddetail").getValue() == null)
var msg = "Reminder: Res Lead Detail field is required";
alert(msg);
                // Give the control focus.
Xrm.Page.ui.controls.get("new_resleaddetail").setFocus(true);
ExecutionObj.getEventArgs().preventDefault();
      if (eventmode == 16)
// 16 = qualify option chosen from the convert lead dialog box
          var msg = "You chose QUALIFY, this is outside the scope of your usage. 
Please select DISQUALIFY.";
          alert(msg);
          // Cancel the qualify operation.
              ExecutionObj.getEventArgs().preventDefault();
    }  // end residential sales
} // end onsave
Microsoft Dynamics CRM Error Report Contents
<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Unable to get value of the property 'parentNode': object is null or undefined</Message>
   <Line>1</Line>
   <URL>/main.aspx?etc=4&extraqs=%3f_gridType%3d4%26etc%3d4%26id%3d%257b6FFB77C6-F50F-E311-A0FB-005056814586%257d%26pagemode%3diframe%26preloadcache%3d1379093638422%26rskey%3d908545450&pagetype=entityrecord</URL>
   <PageURL>/main.aspx?etc=4&extraqs=%3f_gridType%3d4%26etc%3d4%26id%3d%257b6FFB77C6-F50F-E311-A0FB-005056814586%257d%26pagemode%3diframe%26preloadcache%3d1379093638422%26rskey%3d908545450&pagetype=entityrecord</PageURL>
   <Function></Function>
   <CallStack>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET4.0E; MS-RTC EA 2)</BrowserUserAgent>
   <BrowserLanguage>en-us</BrowserLanguage>
   <SystemLanguage>en-us</SystemLanguage>
   <UserLanguage>en-us</UserLanguage>
   <ScreenResolution>1680x1050</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClientTime>2013-09-13T13:34:17</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>1033</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{D0B813F1-3BD1-E111-8F27-005056814586}</OrgID>
    <UserID>{EB773814-3DD1-E111-8F27-005056814586}</UserID>
    <CRMVersion>5.0.9690.3448</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>

Al,
I started the original post ...........  the following code does work...
Hope this helps.
function Form_onsave(ExecutionObj)
//function Form_onsave()
//debugger;
var eventmode=ExecutionObj.getEventArgs().getSaveMode();
//       alert('event mode is '+ eventmode);
//Build an array with Comporium Business Unit values  >>>>
  var arrcbu = new Array;
  arrcbu = Xrm.Page.getAttribute("new_comporiumbusinessunitid").getValue();
  if (arrcbu != null)
       var ocbuItem = arrcbu[0].name;
//       alert('Comporium bus unit name = '+ ocbuItem);
//>>>>>>>>>>>>>>>>> RESIDENTIAL SALES <<<<<<<<<<<<<
// When BU = Residential Sales and EVENT.mode = QUALIFY
// we want to CANCEL this operation.  Because its 'residential',
// These users will never qualify and convert a lead. 
  if (ocbuItem == "Residential Sales")
      if (eventmode == 1 || eventmode == 2)
//      if (event.Mode == 1 || event.Mode == 2)
                 //  save = 1 ,  save & close = 2
//           if(crmForm.all.new_resleaddetail.DataValue == null)
           if(Xrm.Page.getAttribute("new_resleaddetail").getValue() == null)
                var msg = "Reminder: Res Lead Detail field is required";
                alert(msg);
                // Give the control focus.
//                crmForm.all.new_resleaddetail.SetFocus();
                Xrm.Page.ui.controls.get("new_resleaddetail").setFocus(true);
//                event.returnValue = false;
//                return false;
                ExecutionObj.getEventArgs().preventDefault();
//           if(crmForm.all.new_resleadstatus.DataValue == null)
             else if(Xrm.Page.getAttribute("new_resleadstatus").getValue() == null)
                         var msg = "Reminder: Res Lead Status field is required";
                         alert(msg);
                         // Give the control focus.
//                         crmForm.all.new_resleadstatus.SetFocus();
                         Xrm.Page.ui.controls.get("new_resleadstatus").setFocus(true);
//                         event.returnValue = false;
//                         return false;
                         ExecutionObj.getEventArgs().preventDefault();
//           if(crmForm.all.new_spiffeligible.DataValue == null)
              else if(Xrm.Page.getAttribute("new_spiffeligible").getValue() == null)
                           var msg = "Reminder: SPIFF Eligible field is required";
                           alert(msg);
                           // Give the control focus.
//                           crmForm.all.new_spiffeligible.SetFocus();
                           Xrm.Page.ui.controls.get("new_spiffeligible").setFocus(true);
//                           event.returnValue = false;
//                           return false;
                           ExecutionObj.getEventArgs().preventDefault();
        }  // end event mode 1 & 2
      if (eventmode == 16)
//      if (event.Mode == 16)
             // 16 = qualify option chosen from the convert lead dialog box
            var msg = "You chose QUALIFY, this is outside the scope of your usage.  Please select DISQUALIFY.";
            alert(msg);
          // Cancel the qualify operation.
//              event.returnValue = false;
//              return false;
            ExecutionObj.getEventArgs().preventDefault();
        } // end event mode = 16
    }  // end residential sales
} // end onsave

Similar Messages

  • I set an alarm with Siri. Can she only set one at a time, and how can I see/cancel it?

    Title. I set an alarm, then shortly after asked her to set another alarm.
    1) are both alarms in effect?
    2) where can I see/cancel them? It says it can't modify or delete them.

    Go to the Clock app and see if they are listed.  I just set two via Siri on my iPad and both are listed. I can turn them off or deleted (via edit button) the alarms.

  • Excise Invoice of Captured without PO can't be canceled with J1IEX

    Dear all,
    I entered the EWPO(Excise Invoice Without PO) from J1IEX transaction with processing mode "A01 Capture Excise
    Invoice" and reference document "R06 Without Purchase Order".
    But when I cancel it from same transaction, the error below has occurred.
    "Excise invoice xxx has already been posted for vendor XXX."
    And I couldn't cancel it from J1IS or J1IH transaction, too.
    Do you know how to cancel it?
    When I asked it to OSS, their answer was as following.
    Answer of person in charge 1.
    You have to reverse Part 2 with J1IH transaction, and cancel Part 1 with J1I5 transaction.
    ->(My confirmation result)
        But on the EWPO screen, there are no fields to input the material document number.
        So I couldn't cancel Part 1 portion from J1I5.
    Answer of person in charge 2.  (escalated from person 1)
    You can continue the cancellation from J1IEX with pressing enter key, ignore a message.
    ->(My confirmation result)
        As that operation result, Excise Invoice "0000000000" was created with status "B" separately.
        But ,, when a new posted EWPO was canceled, the Invoice "0000000000" described above was overwritten.
        This method was not able to be used.
    Answer of person in charge 3.  (escalated from person 2)
    You always have to register a Excise invoice from MIGO transaction.
    If you want to receive goods without PO, you can use movement type 501.
    And if you register a Excise invoice from J1IEX directly, you can't cancel the EI Part 1.
    There are only two ways to cancel the part1
    1. By cancelling the material document.
    2. By using the J1I5 transaction
    The material document is necessary in each case.
    The current EWPO function of direct J1IEX is useless.
    ->(My confirmation result,,,)
        So, what is the EWPO function of below?
       "J1IEX transaction with processing mode "A01 Capture Excise Invoice" and reference document "R06 Without Purchase Order"
    Best regards,
    Iwana

    Dear Padmasri  ,
    Thank you for your reply.
    But,,, as you wrote, that is normal case with PO and GR.
    I know that normal process well.
    I'm asking about EWPO(Excise Invoice Without PO) case.
    As I wrote, EWPO is registered directly from a J1IEX transaction.
    (with processing mode "A01 Capture ExciseInvoice" and reference document "R06 Without Purchase Order")
    The above-mentioned error occurs the Post mode of J1IEX, or Cancel mode, and cancellation of the Excise Invoice is impossible.
    And, since there is no field to input material document number on the screen of J1IEX in that case, a link is not made even GR has posted.
    We would like to apply this EWPO to the material which does not manage stocks.
    (We would like to deal with only the payment of the expense to a vendor, and the payment of Excise.)
    Best regards,
    Iwana

  • I keep getting a pop up asking for my voicemail password.  I can simply press cancel and it goes away, but it happens frequently and often during a text or email.  Is there a way to stop this?  I don't even have a voicemail password.

    I keep getting a pop up message asking for a voicemail password.  I can simply touch cancel and it goes away.  Put it pops up quite frequently during texting, chatting or email.  Is there a way to stop this?  I don't even have a voicemail password.

    Contact your carrier; they are the only ones who can resolve this for you. Use the Carrier Luke,
    "Fun with the Sun, MEta"

  • I have two accounts and for both accounts I use the same emails. I cannot verify my email on my main account because of this. Help? Can I just cancel my other account to avoid confusion?

    I have two accounts and for both accounts I use the same email. I cannot verify my email on my main account because of this. Help? Can I just cancel my other account to avoid confusion? I am totally stuck now.

    By the sounds of it you have linked Email Accounts, if so this means that you will both recieve the majority of the same Emails, and if you do and you read them on your account (which is linked with your husbands) then they will appear to read on the both of them because they are linked. With the majority of Email providers these days they're Emails are (simplified) in the cloud you could say, meaning that if you read or delete shared Emails then it will do the same on both accounts rather than just the yours.
    I hope all that made sense, sorry that I couldn't be of anymore assistance.. If you havent already try googling your problem - you may find some answers on there

  • How can I get "Canceling sync" to stop?

    How can I stop "Canceling sync" to stop?  My iphone and ipad both got stuck on this step after syncing.  How can I stop it?

    Thanks for the tip.  If only I could find somewhere where I did not lose the signal.
    I am based in the United Kingdom. The carrier is Orange.
    I lose the signal inside buildings and outside of buildings.  It happens at work and at home.  It happens in Centarl London in the open air and inside.  It happens in small towns.. It happens in the countryside.  It happens in motor cars.  It happens in airports.  It happens when the battery is fully charged, when it is half charged and when it's low on charge.  It happens using the phone, when reading messages and when using the internet.
    Hope this helps.

  • Can we do cancellation of  invoice for the period preceding the transaction

    Hi All,
    Can we do cancellation of  invoice for the period preceding the transaction after the closing MMPV?
    Thanks,
    Praveen

    Hi,
    Unfortunately the answer is no. Two reasons for it.
    a. The period for which you want to post is already closed
    b. The period for which you want to reverse the invoice falls before the period your invoice is created (as I have understood your question) which is not allowed....
    Hope this helps
    Thanks
    Mukund S

  • Accounting document can not be canceled in fb08

    Hi Experts,
    system want allow me to cancel my FI postings in t-code FB08. system shows the following error(accounting document can not be canceled in fb08)

    I agree with you Eli
    Check if that particular document is a "Clearing document"
    If yes, first you need to Re-set and reverse
    Use FBRA
    Thanks

  • Why can't I cancel an auto payment to Kdan and why won't you refund my 5.99

    WHy can't I cancel anyway auto payment to Kdan and why won't u refund my 5.99 payment?

    Nno idea what kdan is.
    No refund because because we didn't charge you, this is a user to user forum-NO APPLE HERE.
    you need to contact whatever, whomever kdan is and ask them for a refund.

  • Invoice can't be cancelled

    Hi Guys:
               I activate the invoice print out automatically, it works, but I find the Invoice can't be cancelled after that.
               When I save the cancellation , 'Update was terminated' , I check the system log,the error message is that 'the invoice has been cancelled, you can't print it'.  In billing output condition record, 'print date/time' was set to '4 send immediatelly'.
               I think there shouldn't be  inconsistent for this.
               Is there any idea or expe for this?
               Thanks.
    Stephen

    Hello,
    The Issue is with the Number range of the Document.
    The Express Document error occurred due to overlapping of the number range in the number range object.
    As Number range is the Primary key in table of Billing and Excise Invoice system does not allow number to be overlapped.
    In your Inbox you can check the Number range object which has the Problem.
    Kindly check the Current number ,system is trying to assign to your billing document and check whether that Number already exist in Table.
    Regards,
    Rohit

  • Can we disable cancel button in the File download

    Hi Experts,
    Working in jdev 11.1.1.30.
    Can we disable cancel button while trying to download file. and by default file will open with out click on open file, is thes possible?
    Edited by: user5802014 on Aug 17, 2010 9:15 AM

    Hi Kamal,
    how to disable “Cancel and keep workitem in Inbox” button in the user decision.
    As far as i know this is not possible. Just recollected reading this [old thread.|http://mailman.mit.edu/pipermail/sap-wug/2004-September/014240.html]
    then the work item is regenerated for him alone.
    Again this is a standard behaviour, as soon as the workitem is executed by one of the responsible agents it is reserved for that person so that no one can perform any action on it unless the first person replaces it intentionally. Yes, it would have been a better option to have it replaced automatically on pressing "Cancel and keep the workitem in inbox" but this is the way the design is. It is the responsibility of the agent to replace it manually (using "Replace" button) after performing any action on the workitem including pressing "Cancel" button. You may need to take care of this in the user training.
    Additionally you can also schedule a report (may be once a day in the midnight) which can check for the reserved workitems and replace all of them using "SAP_WAPI_PUT_BACK_WORKITEM". This would make sure that the workitems are replaced to all users even if the user has accidentally forgot to replace the workitem. Again in this case the user cannot "Reserve" a workitem even if he/she wants to (as your scheduled report would replace it in the midnight).
    Thanks,
    Prasath N
    Edited by: Prasath Natesan on Dec 26, 2007 5:56 PM
    changed "Replace manually" button to "Replace" button

  • Can you please cancel my subscription

    Can you please cancel my subscription

    Please cancel my subscription too ... and come up with an easier way for others to do the same than having to complain about it via this forum ... or wait and wait and wait for someone to pick up the chat ...
    Bill

  • Is there a phone number i can call to cancel my account

    is there a phone number i can call to cancel my account

    Please do let us know the issue as I was unable to trace any CC registered to this Adobe ID of Forum, please let us know if it is under any other Adobe ID, you can mail the order number by personal messaging too.
    Regards
    Rajshree
    CS, T2

  • HT201238 How i can do to cancel a renewal  my storage plan.

    How i can do to cancel a renewal  my storage plan ?

    Please can you tell me how I How i can do to cancel a renewal  my storage plan. cancel the renewal of the next storage plan. Because I dont want to pay every year and I am not using my phone. Thank you in advance

  • How can I cancel my subscripction before 30 days are passed? I don't find any telephone number or addresse where I can do the cancel. Anybody can help me? thanks

    How can I cancel my subscripction before 30 days are passed? I don't find any telephone number or addresse where I can do the cancel. Anybody can help me? thanks

    Cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

Maybe you are looking for

  • [SOLVED] Images being rendered in abnormally low quality

    Hi guys, I'm not entirely sure what the issue is since I don't usually play around with image {libraries,software,etc} on Arch, but I have noticed recently that images on Arch, regardless of WM/DE, have been rendered (drawn?) in very low quality. htt

  • SMTP+Iron port out going mail issue

    Hi, One of the EBiz instance is configured with Iron port SMTP server for outgoing workflow mails. Th IRONPOrt mails are relayed using round robin technique. From the EBiz server OS if i fire mails the mails mails are relying using the round robin te

  • After Effects CC???

    Hi Adobe staff, I just read this article: http://blogs.adobe.com/aftereffects/2013/05/introducing-the-new-after-effects-cc.html As I understand this, there will be no more option to upgrade AE CS6 to the next version but it's either joining the cloud

  • FileNotFoundException when using DMUtils

    Hello,<br /><br />I am getting a FileNotFoundException when I call DMUtils.getDataBuffer(). I  verified I have the correct permissions on my tmp directory (/tmp/formserver). The tmp directory does contain files and sub-directories created by LiveCycl

  • Vendor Management Inventory (VMI)

    Hi All, What is the Components of SCM 5.0? SCM Planning,SCM EXe,SCM Collaboration and SCM Co-ordination(EM,PM) is right? SCM is separate server or is it  integrated with BI 7.O? Please explain and if possible please post some links. Thanks KN