none
CopySystemFormRequest() , How to add a new form name.. By default the new form name has a 1 at the end. I want to give a new name during the request RRS feed

  • Question

  • I have a code that created a clone of the existing Entity Form & it works fine.

    Example:

    Existing Form Name: FormSample

    New Form Created: FormSample1 .... it just adds 1 at the end.

    I want to give it a name during my request, so the user doesn't have to go there to change the name, It really destroys the purpose of automation.

    Do I need to write another function to get the new form ID and then update the display name ???

     private void BtnCloneSysForm_Click(object sender, EventArgs e)
            {
                
                CopySystemFormRequest req = new CopySystemFormRequest();
    
                //what entity form do we want to copy
                req.SourceId = new Guid("BCD26E1B-7ADD-45A6-9A3A-F0A245AF49BD");
    
                CopySystemFormResponse resp = (CopySystemFormResponse)Service.Execute(req);
    
                if(resp != null)
                {
                    MessageBox.Show(this,resp.Id.ToString());
                }
            }


    Sunday, August 25, 2019 6:19 PM

All replies

  • Hi ddd3nick,

    Thank you for posting here.

    First, I want to get some information about Service.Execute() method. What namespace or package do you reference?

    Second, I suggest that you could try the following code to rename it.

    req.RequestName = "Form2";

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, August 26, 2019 2:40 AM
    Moderator