locked
Copying Values into subgrid in crm 2013 RRS feed

  • Question

  • Hi,

    I am using crm 2013, i need to copy a field values to subgrid.

    how can i do this. please anyone help me if you have any information.

    Thanks in advance,


    Nagaraj

    Friday, December 6, 2013 8:18 AM

Answers

  • Hello Nagaraj,

    I have already told you in my earlier reply, you can't update to subgrid directly, instead you need to update the target entity. so to update target entity you need it's primary id (I think you have that in that textbox), so you could write a javascript/.net code to read this field from your source entity and update target entity. If you will check SDK you will find lot's of sample for data retrieve and update.

    HTH


    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, December 11, 2013 6:53 AM
    Moderator
  • Hi,

    After going to this long chain of interactions, here is what I can understand in simple terms:

    Issue:

    1. You have a text field in Opportunity form which contains the "Product Name" concatenated with the "Product Id".
    2. Now you are using the "Product Id" to retrieve the "Product Details" such as "Product Range Value", "Product Type"
    3. Your intention is to display the retrieved details of the product to be displayed in the associated grid view of "Product" present on the Opportunity form or on the left navigation.

    Correct me in case my understanding is different from yours.

    Now moving on to resolution:

    Steps you need to perform:

    1. When you retrieve the product details in the Javascript, thereafter you need to associate that product to the opportunity record
    2. For Associating the record, refer this link
    3. In case, you are not associating an existing record and want to create a new record to be displayed in your grid, refer this link or you may refer to the SDK sample for the rest or jquery operations. For doing this through .NET you can write plugin which you can also refer from the CRM SDK samples.

    I would really appreciate to promptly say whenever you do not understand anything and provide all the required info so as to avoid any repetition of answers which response provider had to mention again.

    I hope this helps to resolve your issue.


    Anubhav Bajpai

    Wednesday, December 11, 2013 11:55 AM

All replies

  • Hello Nagaraj,

    You need to update that value in respective entity (whose records are shown in subgrid) and then refresh your subgrid, you will be able to see updated value.


    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.

    Friday, December 6, 2013 8:30 AM
    Moderator
  • Hi Mahender,

        Thanks for your prompt reply. In opportunity entity we are having one field named as 'textbox'(datatype: multiple lines of text) it contains some product Names. we need to copy these product names to another subgrid in the form.

    Thanks,


    Nagaraj

    Friday, December 6, 2013 9:13 AM
  • Hello,

    As I said you need need update this value which is in opportunity to the child entity (I hope you are displaying related entity in subgrid) which you are displaying in subgrid, you can add js/plugin code for this and then you can add corresponding field to the view that is displayed in subgrid. let us know if you need more information on this.


    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.

    Friday, December 6, 2013 9:19 AM
    Moderator
  • Hi Mahender,

        Sorry i could not understand what you explained. Can you please elaborate what i need to do. Text-field and Subgrid are two different items in the same entity(Opportunity). One more thing is text field contains Product information, and it is a hidden field. So we need to show those values in subgrid.

    Thanks,


    Nagaraj

    Friday, December 6, 2013 10:02 AM
  • Ok,

    >Which entity you are displaying in subgrid ??

    >Are referring opportunity product grid ??

    > When you want to transfer that value to grid entity ??


    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.


    Friday, December 6, 2013 10:09 AM
    Moderator
  • Product entity.

    Thanks,


    Nagaraj

    Friday, December 6, 2013 10:11 AM
  • Please provide complete information ? When you want to transfer that value to product entity ??

    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.

    Friday, December 6, 2013 10:21 AM
    Moderator
  •         Actually we have some opportunity records in old crm(Crm 2011). In that crm we have a text field called textbox. After upgradation(to crm 2013) we want to show this old values in a subgrid in crm 2013. after upgradation the values will come in to the the same textbox field in new crm. but we need to copy these values in to a subgrid. This is one time process, after this we will directly select the product values from subgrid.

    i hope you understand the scenario, please let us know if you have any questions.


    Nagaraj


    Friday, December 6, 2013 10:31 AM
  • Ok, You can create similar field in product entity and create on workflow to copy this field from opportunity to product entity. you can then add that field in the product entity view which is shown to subgrid. To run your workflow select opportunity records and run your workflow.


    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.

    Friday, December 6, 2013 11:01 AM
    Moderator
  • Hi Mahender,

    Here the below i am copying the sub-grid in Opportunity.

    and one field textbox(Multiple lines of text) in opportunity as below,

    in the above field a product name is there(Soap and its ID). i need to add this Soap to the above grid below Accessories. First i need to get the soap details like ID, ProductRange_value and product type values from product entity and i need to copy those values below the Accessories in Opportunity.

    Thanks,


    Nagaraj

    Monday, December 9, 2013 7:49 AM
  • Hi,

    Are you saying you want to merge ProductName + ProductRange_value and Product ??, it may create string length issue. so better to create a separate field and bring your data in that field and add it to this grid.


    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.

    Monday, December 9, 2013 8:56 AM
    Moderator
  •    Not exactly, we need to take Soap details either Id or name, and we need to add this product into subgrid that's it.

       Thanks & Regards,


    Nagaraj

    Monday, December 9, 2013 9:04 AM
  • Mahender,

        Is there any JavaScript to do this. please suggest us on what way we can achieve this.

    Thanks,


    Nagaraj

    Monday, December 9, 2013 11:15 AM
  • You can read your field (get ID), using retrieve method, once you have details use update method to update product record.

    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.

    Monday, December 9, 2013 11:19 AM
    Moderator
  • Hi Mahender,

    After retrieving the records from that textbox field, how can i assign it to a subgrid. i searched in the web but i couldn't find any script.

    Thanks,


    Nagaraj

    Monday, December 9, 2013 12:48 PM
  • Hi,

    I am using crm 2013 online, i need to copy a field values to subgrid.

    how can i do this.

    vandana

    Tuesday, December 10, 2013 9:06 AM
  • Could you provide some more details about your requirement ??

    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, December 10, 2013 9:15 AM
    Moderator
  • Hi ,

    in my previous CRM(2011) i used a field and now i want same field data to be copied from that field to subgrid in CRM 2013


    vandana

    Tuesday, December 10, 2013 9:32 AM
  • Could you expand on what do you mean by copy a field value to a subgrid? A subgrid simply displays records related to the record you're looking at -- subgrids don't store field values. It's like saying you want to copy some text to a folder -- a folder stores files and doesn't store text directly. Maybe a real-life example would help.


    Neil Benson, CRM Addict and MVP at Slalom Consulting. Find me on Twitter. Join over 20,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Tuesday, December 10, 2013 11:21 PM
    Moderator
  • Hi Mahender,

        Can you please give us any suggestions on the above thread, because we getting near to the up-gradation to CRM 2013. if we don't find any solution it will leads to manual work. I can provide more details if you want.

    Thanks,


    Nagaraj

    Wednesday, December 11, 2013 6:42 AM
  • Hello Nagaraj,

    I have already told you in my earlier reply, you can't update to subgrid directly, instead you need to update the target entity. so to update target entity you need it's primary id (I think you have that in that textbox), so you could write a javascript/.net code to read this field from your source entity and update target entity. If you will check SDK you will find lot's of sample for data retrieve and update.

    HTH


    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, December 11, 2013 6:53 AM
    Moderator
  • Hi Neil,

      Actually we have some opportunity records in old crm(Crm 2011). In that crm we have a text field called textbox. After upgradation(to crm 2013) we want to show this old values in a subgrid in crm 2013. after upgradation the values will come in to the the same textbox field in new crm. but we need to copy these values in to a subgrid.


    vandana

    Wednesday, December 11, 2013 7:04 AM
  • Hello,

    I hope you are referring the same which is discussed already here : http://social.microsoft.com/Forums/en-US/8be63dab-4d11-4bac-b03e-77ae5e21dfee/copying-values-into-subgrid-in-crm-2013?forum=crmdevelopment

    Please don't create duplicate threads.


    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, December 11, 2013 7:14 AM
    Moderator
  • Hi,

    After going to this long chain of interactions, here is what I can understand in simple terms:

    Issue:

    1. You have a text field in Opportunity form which contains the "Product Name" concatenated with the "Product Id".
    2. Now you are using the "Product Id" to retrieve the "Product Details" such as "Product Range Value", "Product Type"
    3. Your intention is to display the retrieved details of the product to be displayed in the associated grid view of "Product" present on the Opportunity form or on the left navigation.

    Correct me in case my understanding is different from yours.

    Now moving on to resolution:

    Steps you need to perform:

    1. When you retrieve the product details in the Javascript, thereafter you need to associate that product to the opportunity record
    2. For Associating the record, refer this link
    3. In case, you are not associating an existing record and want to create a new record to be displayed in your grid, refer this link or you may refer to the SDK sample for the rest or jquery operations. For doing this through .NET you can write plugin which you can also refer from the CRM SDK samples.

    I would really appreciate to promptly say whenever you do not understand anything and provide all the required info so as to avoid any repetition of answers which response provider had to mention again.

    I hope this helps to resolve your issue.


    Anubhav Bajpai

    Wednesday, December 11, 2013 11:55 AM