• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 689
  • Last Modified:

SharePoint 2013 Custom Workflow Attendee and Email Issue

Kind of new to attempting any custom development in SharePoint.  Working with 2013 and have the 2013 Workflow Farm setup/working.  I am trying to have a calendar that users can register to appointments via custom list.  I have the list that pulls the title into its  own "Event" field as a lookup.  Also have a workflow on the calendar that adds the current user as an attendee and made that field "not required".  I'm trying to accomplish this:
1) Have the Custom List update the Calendar list attendee field with the username. Currently it wipes out what is there and replaces with the "Created By" name. Tried to set a variable that would put the current attendees in a string and just add the current user, then use that variable to update the attendee field.  No luck.  Ultimately if I can understand this enough and get fancy enough, I'd setup a workflow  that can have someone delete their own registration item in the custom list and remove only their own name from Attendees...
2)  Have a workflow kick off an email that sends the registrant the calendar details. Have tried to pipe in variables to get the ICS file (some variation of : this )  If I put the List ID in brackets I get an error about having that and variables in the same code for an email workflow.  In any event I can't really get the email workflow to give any kind of nice piped in values the best looked like this and had the wrong date: You registered for  {"results":[{"Id":22,"Value":"Test Event 8"}]} on 1/1/0001 12:00:00 AM
0
mcburn13
Asked:
mcburn13
  • 2
1 Solution
 
mcburn13Author Commented:
As usual either it doesn't get resolved or I figure it out myself.  In this case I was able to get the workflows working correctly by using "Login Name, Semicolon Delimited" - this fixed the ability to create a variable and pipe existing attendees + current one by adding Workflow Context: Initiator to the end. Looked something like this:
[%Current Item:Attendees%];[Workflow Context:Initiator%]

Ended up doing this right in the calendar list- the only problem that remains is being able to hide the Edit button for registrants. They need Edit Access in able to update that Attendee Field in the workflow (even with the Workflow set to run as an app with elevated privileges in App Step). So created a copy of Contribute and removed "Add New Items and Delete"

So if someone was able to give me instructions on how to hide this Edit button for non-admin users on THIS list only please let me know. I've looked at a bunch of articles with JavaScript and CSS solutions that don't seem to work or apply to SharePoint 2013 Ent.
0
 
mcburn13Author Commented:
Additionally, adding target audience functionality allowed restricting the "Edit" button on the EditForm.aspx for calendar
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now