SharePoint Designer 2013 Workflow: Reading Check In comment, programmatic elevation of permissions, alternatives?

I’ve created a workflow for a review process, that copies a file into a “working” library, takes the check-in comment through Rest API (with elevated permissions and full appinv access) and then saves it as part of the comments history log (Among many other things, but this is the problem specifically).

This has been working great and dandy UNTIL, I’ve packaged it and need to deploy as template, I’ve noticed that the workflow ID changes and this means that each time a new site (Project site) is created, needs to send a mail/flag somehow someone from IT to elevate permissions in the appinv for that specific site collection (manual Admin appinv authorization).

I know how to do all of the above very well, with the exception that it’s not going to work for a massive deployment. With all of the above said this are the questions:

  • Can I get the Check In Comment through a SharePoint Designer 2010 or 2013 in any other way that does not mean using Rest API?
  • Is it possible to programmatically elevate permissions? I found this resource but I can’t seem to make anything out of that, it’s a powershell and should be run on a timer? http://parlaesolutions.com/blogs/Programmatically-Enable-Trust-for-Built-In-Workflow-App
  • Any other ideas?

My first suggestion was, could we create a new field and add the comment there followed by a no, it has to be the Check In Comment sadly.

Thank you!

Ckeditor with programmatic text_format field

I have ckeditor installed on my site, and when I use filter formatted textareas on my website where admin pages or fields were created using the UI, the ckeditor replaces correctly. When I use the form api to build one, it does not. This appears to happen on every textarea I make.

Here is what I am using.

    $  form['message'] = array(        '#type' => 'text_format',        '#title' => t('Message'),        '#format' => 'filtered_html',      ); 

The field renders as a filtered html field, the ckeditor just won’t attach to it. How can I resolve this?

Thank you!

Programmatic list of Webform elements?

I am building a D8 module that, for configuration, needs a list of webforms and their fields (just the entity reference fields, but I am not picky)

I can get the webforms with this:

$ webforms = \Drupal::entityTypeManager()->getStorage(‘webform’)->loadMultiple(null);

But once I get the returned elements (Drupal\webform\Entity\Webform::__set_state), how can I fetch the elements in the webform referenced?

How to have “programmatic” (cryptic) names for each question in a google form

Is there any way to set question cryptic-name/variable in addition to the question visible to one answering the form.

What I need is that when I export forms questions to google sheet I can programmatically match questions and answers to do particular calculations.

Currently, column names (headers) are equal to elaborate questions that use sees, and apart of being cumbersome, every time I slightly change the text of the question, I have to propagate the change into the program. Surely, the position of the question is not acceptable neither.

Magento 2 toggle switch (yes/no) in admin config of custom module using system.xml or in any programmatic way

I understand that we can create a toggle switch using form with ui_component. However, I want to create an admin configuration for my custom module using system.xml configuration.

Is there any way to apply the toogle switch (yes/no) (which is a ui_component of magento, to system.xml configuration? I want it to be implemented instead of a select type with dropdown option.

reference: Magento 2 form field toggled type

enter image description here