web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get and set value of HTML Jquery Table cell with plugin

(0) ShareShare
ReportReport
Posted on by 3,455

Hi all CRM friends,

I have two HTML table generated with J Query on the Opportunity entity related with Product. First Table opening through ribbon button and there are editable fields like Discount amount and Net Unit Price. when the fields are edited and click on the save button Plugin will be trigger and read edited value and add to related fields on the another table fields which is also on the opportunity entity. We use Dynamics CRM 2016 v8.2 on premise.

I am not good in C# coding needs your help.

Thanks for the all answer in advance.

*This post is locked for comments

I have the same question (0)
  • Radu Chiribelea Profile Picture
    6,667 on at

    Hi Necdet,

    How far off are you with your implementation?

    When you say that after you click the save button the Plugin will be triggered and update value to related fields on another table on the opportunity entity - i take it that all the fields that are part of you HTML table belong to the opportunity entity or do they belong to other crm entities as well?

    The logic that i'd understand you need is

    1. Update Table 1 and save - how is the save request generated? Does this call the WEB API or through the SOAP endpoint ?

    2. Plugin gets triggered and does several calculations and returns a response to the client

    3. Client reads response and sets the corresponding values and if need be refreshes also the page

    Is this correct?

    Regards,

    Radu

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Necdet,

    I think the way you thought your design using custom HTML which  can be done by OOB entity.

    As per your scenario  you have custom HTML which opens from Ribbon where you have some custom control, now when you want to click on save button you want to do some server side logic to push those data into another table. I think you are giving additional effort using custom HTML. Instead of custom HTML , you can create entity with the attributes you want. You can easily open that entity forms using Ribbon button. [ [View:https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-navigation/openform]].

    In addition to that you can also use additional OOB functionality  compare to HTML like workflow , action, client side Xrm method ,  quick view form  subgrid , calculated field , business ruls you may not need to write plugins . Use this if it's suits your  requirement otherwise go for plugins of on save event.

    Try to do above suggested way ,  I am sure this will make your life easy instead of custom HTML.

  • necsa Profile Picture
    3,455 on at

    Hi Radu,

    Thanks for the answer. The both HTML related with Product entity. First Table pop up with ribbon button on the opportunity. There are two fields which are manualy editable "discount" and "net unit price" When the user click on the save button by first table the plug in trigger and update or create on the second HTML table which has almost same view and fields on the "Opportunity","Quote",and "Invoice". 

    Thanks in advance

  • necsa Profile Picture
    3,455 on at

    Thanks Guotam,

    Thanks for your kindly answer.

    However I need Plugin and I don't have problem with JavaScript but I am not strong with C# I don't know how to get value from HTML cell and add on another.

  • Verified answer
    Radu Chiribelea Profile Picture
    6,667 on at

    You could set up an action in CRM. The flow would be following :

    - Invoke the action via JavaScript (and send any input parameters that would be required)

    - have a plug-in triggered when the action is invoked.

    * links: crmbook.powerobjects.com/.../developing-a-plug-in

    * links docs.microsoft.com/.../plugin-development

    - Once the plug-in finished processing it will send the output back to the client

    - Javascript processes output parameters and populates the 2nd table.

    Yet i think there might be easier ways to do this worth exploring (custom controls, business rules, out of the box subgrids), relying more on out of the box functionality rather than building UI components.

    Regards,

    Radu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans