Is it possible to provide a link to the Editor Modal in an Email?

Is it possible to provide a link to the Editor Modal in an Email?

shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

I am trying to send and email to a POC once a status on a field in my table changes. The POC would need to take actions with the capability to add a comment. Is it possible to provide a link to the "Editor" Modal for the item in an email?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited July 2021

    What you would need to do is create the link yourself with query parameter's that your page / script will understand - e.g. ?edit=15 (where 15 is the row id to edit).

    Then your script would be able to check the query parameters, and if edit is present, trigger editing on that row (edit()).

    Allan

  • shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

    Thank you Allen :) I will try it out

  • shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

    Hi Allen,
    So here is the dilemma; I am using Editor in combination with SharePoint on prime and therefore my html page is embedded within a SharePoint .aspx page - the solution did not work any ideas?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I don't think it will make any difference what the backend is, since this is a Javascript client-side operation that needs to be performed. Can you show me what you tried?

    Allan

  • shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

    Hi Allen,
    my link looks like this:
    https://mySharepointSite.myOrg.gov/Location/Pages/myPage.aspx?edit=4

    Please note that the html where the tables reside are embedded within a SharePoint webpart content editor, the .html that is calling the .js files with document ready and my editordatatable, is called myHTML.html and that is not part of the URL.

    when I run the link all it does is refreshing the page

  • shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

    I was able to extract the ?edit=4 in my JS code. Now the questions is in the JS code how to I call the modal to open for row 4

  • shaadak@gmail.comshaadak@gmail.com Posts: 36Questions: 3Answers: 0

    Hi Allen, I think each time I ask a question - I also try to figure it out myself -
    The answer to my question: I had to use the** window.location.href** to be able to get the query parameter of the url passed to my JS code, which is great and I have been successful opening the modal within a link provided to edit.

    My new question is in the following line:

    editor.edit('#APAA tbody tr:eq(0)', 'Edit record', 'Update')

    is there a way I can check against another id being equal to some unique value?

    for example can I right something like this:

    editor.edit('#APAA tbody rowTitle:eq("myUniqueId")', 'Edit record', 'Update')

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    As long as it's a valid selector, that should be OK.

    Colin

Sign In or Register to comment.