Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Show attachment as mandatory only for Create User Request

h_sapkota
Regular Contributor
Regular Contributor

Hi Team,

When we try to create user via Create User Request tile, there is a option for Attachment of files at the bottom. We need to make the attachment as mandatory when user is created. However, the mandatory attachment is showing up for all the requests such as Role Request, Application account request etc.

  • Solution Tried:
    Enabled Add Attachment Mandatory in Global Configuration > Requests > Settings > Add Attachment Mandatory
  • Observed Behavior:
    All the request forms are showing attachment as mandatory such as, Role Request, Application Request, Create User Request
  • Expected Behavior:
    Only Create User Request should show attachment as mandatory.
  • Screenshot:

         h_sapkota_0-1687792468421.png

Thanks and Regards,

Hitesh Sapkota

5 REPLIES 5

RakeshMG
Saviynt Employee
Saviynt Employee

If Global Configuration > Requests > Settings > Add Attachment Mandatory is enabled all the pages will be enabled for attachements.


​Regards

Rakesh M Goudar

h_sapkota
Regular Contributor
Regular Contributor

Hi RakeshMG,

Turning Add attachment Mandatory will enable this for all types of request. But our requirement is to make attachment mandatory only for Create User Request.

Regards,

Hitesh Sapkota

Implement workaround ask user if attachment attached as acknowledgment checkbox


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

RakeshMG
Saviynt Employee
Saviynt Employee

This config is Global change and currently your requirement is not available.

Please raise an enhancement request in Idea portal. https://ideas.saviynt.com/ideas


​Regards

Rakesh M Goudar

h_sapkota
Regular Contributor
Regular Contributor

Hi @RakeshMG and @rushikeshvartak ,

I am able to show attachment as mandatory only for Create User Request. Please follow the below steps:

1. Go to Global Configuration > Requests > Settings > Add Attachment Mandatory. Make sure Add attachment Mandatory is unchecked.

2. Now, Go to Admin > Settings > File Directory > Views  and Edit 

workflowmanagement/createupdateuserrequestfirststep.gsp
 

3. In the .gsp file, go to the attachmentblock div section and replace below section

${(reqAttachment != null && reqAttachment == '1' && userkey == null) ? "*" : ""}

with

${(iscreatecase == 'Y' && userkey == null) ? "*" : ""}

4. Now, go to opennextpage(formname) function and replace below code

<g:if test="${userkey==null && reqAttachment != null && reqAttachment == '1'}">

with 

<g:if test="${userkey==null && iscreatecase == 'Y'}">

5. This piece of code will validate if you are attaching any file or not while creating request.

6. Save the GSP file, Upload it and then restart your system.

Regards,

Hitesh Sapkota