Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Modification of gsp file

Rashmi
New Contributor
New Contributor
We are trying to modify create AD group GSP file. We used the below function to restrict the characters in description field
 
$(".descriptioncheck").each(function () {
                if (('' + $(this).attr("name") != 'undefined')) {
                    if ( $(this).val().toString().length > 200 ) {
                        $($(this).select2("container").css("border", "1px solid red"));
                        valid = false;
                        if (msg == '') {
                            msg = "Max allowed character in description is 200";
                        }
                    }
                    else {
                        $($(this).select2("container")).css("border", "1px solid #e5e5e5");
                    }
                }
            });
 
And then updated the command below to call this function.
 
<input type="text" class="form-control mandatorytext descriptioncheck" aria-label="<g:message code="Roles.Description.Default.label" editable="true" maxlength="200"/>" id="description" name="description" value="${fieldValue(bean: rolesInstance, field: 'description')}"/>
 
This restricted the charaters in description field to 200. Now we are trying to restrict the business justification field in a similar way. Below is the function we created,
 
$(".businessJustificationCheck").each(function () {
    var value = $(this).val().trim();
    if (value.length > 0 && value.length > 200) {
        $(this).css("border", "1px solid red");
        valid = false;
        if (msg === '') {
            msg = "Max allowed characters in Business Justification is 200";
        }
    } else {
        $(this).css("border", "1px solid #e5e5e5");
    }
});
 
And the updated the command below to call this function.
 
 
<textarea rows="2" class="form-control mandatorytext businessJustificationCheck" aria-label="<g:message code="Roles.Description.Default.label" editable="true" maxlength="200"/>" name="customproperty29" id="customproperty29"></textarea>
 
However, this doesnt limit the characters in business justification field. Please suggest a way to restrict the business justification field in Create AD group request form.
12 REPLIES 12

rushikeshvartak
All-Star
All-Star

Did you restarted system?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rashmi
New Contributor
New Contributor

hey,

yes the system was restarted.

regards,

Rashmi

Check browser console for errors


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rashmi
New Contributor
New Contributor

hey, we get the below error. The function was working before did the changes

Rashmi_0-1723109625743.png

 

Revert changes and validate


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rashmi
New Contributor
New Contributor

Hey,

We reverted the changes we made for business justification field and it is working as expected now.

Regards,

Rashmi

Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question and hit 'Kudos' button 👍.


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rashmi
New Contributor
New Contributor

Hey,

I am sorry, i meant it was working as before. But we are still not able to set the character limit on business justification field.

As mentioned initially, the same logic is working for description field but is not working for business justification field.

Regards,

Rashmi

share gsp file and does error is same ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rashmi
New Contributor
New Contributor

Hi ,

We have shared the gsp file over ticket #INC-2025900

Attach the modified GSP here as txt file attachment


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

@Rashmi , forum and freshdesk are 2 seperate portal.

When you create a ticket on freshdesk it is with saviynt support team


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'