locked
using Save&New button click crm 2011 RRS feed

  • Question

  • Hello All,

    I have one requirement where we are calling one entity's form on two ribbon button clicks. Form has one optionset field, which we are changing based on ribbon button click.

    For e.g if I am clicking "XYZ" ribbon button ,i am setting form's option set field to "XYZ". Similary if i am clicking "ABC" ribbon button ,i an setting form's option set field to "ABC". Option set field's default value is XYZ.

    I am facing issue ,when user is on form after clicking on ABC button ,option set field is intially set to "ABC" but when user clicks on Save&New its getting set to "XYZ" value which is default value for option set field. Expected value is "ABC"

    Can you help me with this? How can i trace this Save&New event?

    Thnaks and Regards,

    Jayashree

    Tuesday, May 20, 2014 4:01 PM

All replies

  • Hi Jayashree,

    try to force submit the field value on the 'On save' event of the form like this:

    Xrm.Page.getAttribute("YourOptionsetFieldSchemaName").setSubmitMode("always");

    Hope this helps.

    CT


    • Edited by CRM Thirsty Wednesday, May 21, 2014 12:00 AM
    Tuesday, May 20, 2014 11:59 PM
  • If you have your own buttons to create open new form, you can hide save&new button.

    Our Website| Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Wednesday, May 21, 2014 1:23 AM
    Moderator
  • Hello All,

    Let me make it more clear.

    I want to open form from "SaveandNew" and want the same optionset value in field on new form load which we were having initially while saving it.

    Please let me know your thoughts? Is it poosbile to achieve this without using custom ribbon buttons?

    Thanks and Regards,

    Jayashree

    Monday, May 26, 2014 2:15 PM
  • Other option could be to create self relationship and use system mapping to set your field, so you will get it auto populated.

    Our Website| Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Tuesday, May 27, 2014 6:15 AM
    Moderator