Running SPEF Manually? Corporate taking away Custom User Actions ability


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1984

    Here is one for the books … The Corporate Team where I am currently working is proposing to eliminate, at least by rule, all access to Custom User Actions and non-corporate updates to CUA… (Sandbox’ing has already been nixed)

    Believe me … I am not happy about this at all … The Corporate Group is taking SharePoint “Governance” waaaaay over the top IMHO …. but I may not have much of a choice.

    Some of questions (assuming all pathing and access permissions will be correct)
    1) Might it be possible to run the SPEF configuration tool ( …/Pages/SPEasyFormsSettings.aspx ) if I provide the ListID, SiteURL and Source on the query string on the URL? Will loading of / writes back to spef-layoutXXXXX.txt be OK?

    2) Can SPEF run on the NewForm | DispForm | EditForm if I include the three SPEF javascripts into a CEWP at the top of each form to include:
    —- src=…./jquery.bundle.min.js
    —- src=…./jquery.SPEasyForms.min.js
    —- src=…./SPEasyForms_DefaultSettings.js

    3) I’ll assume also the following must be in the CEWP as well
    —– spefjQuery(window).bind(‘load’,function(){spefjQuery.spEasyForms.init();});

    This may turn into a bit of work, and hopefully not too much of a management nightmare, for me … I foresee having an SP List with the ListID, SiteURL, and desired Source with a button for use …

    Thank you in advance for the reply!



    • This reply was modified 1 year, 4 months ago by hzynst.
    Joe McShea

    Um…Ow! Why does your Corporate hate me? 😉

    What you’re proposing should work fine. Specifically:

    RE: 1) The configuration page is not dependent on the User Custom Actions at all. As long as it’s in the same site collection as the list, it will work as well without them as with them. Of course, you’ll no loner have links to it on the ribbon or the list settings page, but that’s surmountable.

    RE: 2) and 3) spEasyForms.init() expects to be called after the form is rendered. As long as those scripts and script blocks are loaded in the same order, they should work the same regardless of how they’re loaded. The timing might be tricky. Due to Client Side Rendering in SP 2013+, the form is rendered by MS JavaScript some time after window.onload, so you might have to do something similar to ExecuteOrDelayUntilScriptLoaded to wait until the form has been rendered. To determine that the form has been rendered, you could look for the Created By and Last Modified fields, which are the last fields rendered in most forms (probably all forms, but I haven’t done an exhaustive survey).

    So technically, SPEasyForms isn’t dependent on user custom actions at all. It’s just dependent on those scripts and script blocks being loaded in a certain order, and after the form is loaded. It just so happens that script link and script block user custom actions satisfy those requirements very well, making SPEasyForms possible. But with a bit of work, you can manually load it just as well, there’s no magic in user custom actions.


    • This reply was modified 1 year, 4 months ago by Joe McShea.
    • This reply was modified 1 year, 4 months ago by Joe McShea.
    • This reply was modified 1 year, 4 months ago by Joe McShea.
    • This reply was modified 1 year, 4 months ago by Joe McShea.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Scroll to top