• Gavin Britto 1
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hello to all the Developers out there! Our University is slowly but surely moving all our staff on to salesforce. However, utill then we are looking to get rid of the paper based system access request process.

1. Currently a new staff member will fill out a Access request paper form and checks off various directories and systems that he requires access to do his/her job.

2. That request is approved by their supervisor and then the paper form is sent to the System Administrators to provision the access.

Now the System Administrators are on salesforce but the supervisors are Not on Salesforce yet.

What I am temporarily trying to do:
 
  •  I tried building an approval process and found out that since the Supervisors are not in Salesforce, they are unable to Approve the Request (They require API enabled User Profiles). Even though, the System Administrators can receive the request, they can't provsion the access until the Supervisor approves the request.
So I developed a System Access Request form on a Public Salesforce site page to submit systems access requests. I want to email The data from the system request form to a supervisor who is outside of salesforce. ( I feel this is way better than walking over to his desk with a sheet of paper). The System Administrators can go ahead and provision the access once they get a call or email from the supervisor approving the electronic access request form. I can mention in the body of the email to contact the system admin at the following email address.

The Visualforce page works fine. However, I need help with the Apex trigger. Maybe a trigger is not the right choice. Any help on having the details from the visualforce form sent to the Supervisor_Email__c would be helpful. 

I started on the Apex Trigger. Feel free to demolish it if neccesary. Visualforce page below.
Trigger SupervisorNotification on SCS_Systems_Access_request ( After Insert){
For( SCS_System_Access_Request SysRequest:Trigger.new){

//initialize outbound email message service
	//Outbound Email Messaging service - single email messaging	
	
	Messaging.SingleEmailMessage = new messaging.SingleEmailMessage();
	
	
	String[] = sendingTo=new String[]{'Supervisor@georgetown.edu'};
		semail.setToAddress(sendingTo);
	
	//The Email Subject would say
		semail.setSubject('Action Required: Access Request Approval');
	
	//Body of the email would say
	semail.setPlainTextBody('Access to the following systems is requested')
	
	//merge fields from SCS System Access Request go here
	
	//send email to supervisor
	Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail});


}

}

VF Page (works fine)
ex:page standardController="SCS_System_Access_Request__c"
           standardStylesheets="true"
    showHeader="false" sidebar="false" cache="false"
    >
    
  
 <head>
    <title>
      GU SCS System Access Request Form
    </title>
    
    <title>
    Confidentiality Agreement
    </title>
    
    <apex:stylesheet value="{!$Resource.POMCSSMAIN}"/> 
  </head>
  <body>
  
  <p><strong class="logo"><a href="http://www.georgetown.edu/">Georgetown University</a></strong></p>
  
  
 
  
  <apex:form >
      <apex:pageBlock title="System Access Request Form">
          Fields indicated by red bar are required.
          <apex:pageMessages />
              <apex:pageBlockButtons >
                  <apex:commandButton value="Submit" action="{!save}"/>                  
                  <apex:commandButton value="Cancel" action="{!cancel}"/>
              </apex:pageBlockButtons>

              <apex:pageBlockSection title="Personal Information" >
                  <apex:pageBlockSection columns="1">
                      <apex:pageBlockSectionItem > 
                          <apex:outputLabel >Data Security Quiz Score</apex:outputLabel>
                          <apex:inputField value="{!SCS_System_Access_Request__c.Data_Security_Quiz_score__c}" required="true" />                                     
                      </apex:pageblockSectionItem>
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.NetID__c}" required="true" />
                      <apex:inputField value="{!SCS_System_Access_Request__c.Email__c}" required="true" />
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.VPN_Access_Required__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Department__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Supervisor__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Phone_Number__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Systems_you_need_access_to__c}" required="true" />
                      
                 <p>
                 test
                 </p>
                 <apex:inputField value="{!SCS_System_Access_Request__c.Confidentiality_Agreement__c}" required="true" />
                                               
                                                           
                  </apex:pageBlockSection>  
                  
                 
                            
             
                      
                </apex:pageBlockSection>  
              
              
      </apex:pageBlock>     
  </apex:form>
  </body>
  
</apex:page>

Thank you in advance!

Sincerely,

Gavin Britto
Hello to all the Developers out there! Our University is slowly but surely moving all our staff on to salesforce. However, utill then we are looking to get rid of the paper based system access request process.

1. Currently a new staff member will fill out a Access request paper form and checks off various directories and systems that he requires access to do his/her job.

2. That request is approved by their supervisor and then the paper form is sent to the System Administrators to provision the access.

Now the System Administrators are on salesforce but the supervisors are Not on Salesforce yet.

What I am temporarily trying to do:
 
  •  I tried building an approval process and found out that since the Supervisors are not in Salesforce, they are unable to Approve the Request (They require API enabled User Profiles). Even though, the System Administrators can receive the request, they can't provsion the access until the Supervisor approves the request.
So I developed a System Access Request form on a Public Salesforce site page to submit systems access requests. I want to email The data from the system request form to a supervisor who is outside of salesforce. ( I feel this is way better than walking over to his desk with a sheet of paper). The System Administrators can go ahead and provision the access once they get a call or email from the supervisor approving the electronic access request form. I can mention in the body of the email to contact the system admin at the following email address.

The Visualforce page works fine. However, I need help with the Apex trigger. Maybe a trigger is not the right choice. Any help on having the details from the visualforce form sent to the Supervisor_Email__c would be helpful. 

I started on the Apex Trigger. Feel free to demolish it if neccesary. Visualforce page below.
Trigger SupervisorNotification on SCS_Systems_Access_request ( After Insert){
For( SCS_System_Access_Request SysRequest:Trigger.new){

//initialize outbound email message service
	//Outbound Email Messaging service - single email messaging	
	
	Messaging.SingleEmailMessage = new messaging.SingleEmailMessage();
	
	
	String[] = sendingTo=new String[]{'Supervisor@georgetown.edu'};
		semail.setToAddress(sendingTo);
	
	//The Email Subject would say
		semail.setSubject('Action Required: Access Request Approval');
	
	//Body of the email would say
	semail.setPlainTextBody('Access to the following systems is requested')
	
	//merge fields from SCS System Access Request go here
	
	//send email to supervisor
	Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail});


}

}

VF Page (works fine)
ex:page standardController="SCS_System_Access_Request__c"
           standardStylesheets="true"
    showHeader="false" sidebar="false" cache="false"
    >
    
  
 <head>
    <title>
      GU SCS System Access Request Form
    </title>
    
    <title>
    Confidentiality Agreement
    </title>
    
    <apex:stylesheet value="{!$Resource.POMCSSMAIN}"/> 
  </head>
  <body>
  
  <p><strong class="logo"><a href="http://www.georgetown.edu/">Georgetown University</a></strong></p>
  
  
 
  
  <apex:form >
      <apex:pageBlock title="System Access Request Form">
          Fields indicated by red bar are required.
          <apex:pageMessages />
              <apex:pageBlockButtons >
                  <apex:commandButton value="Submit" action="{!save}"/>                  
                  <apex:commandButton value="Cancel" action="{!cancel}"/>
              </apex:pageBlockButtons>

              <apex:pageBlockSection title="Personal Information" >
                  <apex:pageBlockSection columns="1">
                      <apex:pageBlockSectionItem > 
                          <apex:outputLabel >Data Security Quiz Score</apex:outputLabel>
                          <apex:inputField value="{!SCS_System_Access_Request__c.Data_Security_Quiz_score__c}" required="true" />                                     
                      </apex:pageblockSectionItem>
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.NetID__c}" required="true" />
                      <apex:inputField value="{!SCS_System_Access_Request__c.Email__c}" required="true" />
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.VPN_Access_Required__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Department__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Supervisor__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Phone_Number__c}" required="true" />
                      
                      
                      <apex:inputField value="{!SCS_System_Access_Request__c.Systems_you_need_access_to__c}" required="true" />
                      
                 <p>
                 test
                 </p>
                 <apex:inputField value="{!SCS_System_Access_Request__c.Confidentiality_Agreement__c}" required="true" />
                                               
                                                           
                  </apex:pageBlockSection>  
                  
                 
                            
             
                      
                </apex:pageBlockSection>  
              
              
      </apex:pageBlock>     
  </apex:form>
  </body>
  
</apex:page>

Thank you in advance!

Sincerely,

Gavin Britto
Here is the error message I am recieveing:

Here's the error message

Here is my code for the button:

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
DocuSign_CreateEnvelope();

//********* Option Declarations *********//
var
RC = '',
RSL = '',
RSRO = '',
RROS = '',
CCRM = '',
CCTM = 'Signer 2~Carbon Copy',
CCNM = '',
CRCL = '',
CRL = 'Email~{!JSENCODE(Contact.Email)};FirstName~{!JSENCODE(Contact.FirstName)};LastName~{!JSENCODE(Contact.LastName)};Role~Signer 1;RoutingOrder~1;RecipientNote~,Email~{!JSENCODE(Contact.Hidden_Real_Estate_Agent_Email__c)};FirstName~{!JSENCODE(Contact.Hidden_Real_Estate_Agent_First_Name__c)};Role~Signer 2;RoutingOrder~2;RecipientNote~{!JSENCODE(Contact.FirstName)} {!JSENCODE(Contact.LastName)} has signed the pre-approval letter.;LastName~{!JSENCODE(Contact.Hidden_Real_Estate_Agent_Last_Name__c)}',
OCO = 'Tag',
DST = '',
LA = '1',
CEM = '',
CES = 'xxxxxxxxxxxxxxxxx {!JSENCODE(Contact.FirstName)} {!JSENCODE(Contact.LastName)}',
STB = '0',
SSB = '1',
SES = '1',
SEM = '1',
SRS = '0',
SCS = '0',
RES = '1,0,0,1,90,1';

//********* Page Callout (Do not modify) *********//
window.location.href =
"/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Contact.Id}&RC="+RC+
"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************//
 
Are there any future plans to implement a Pardot Trail for Trailhead?