AnsweredAssumed Answered

Alternative to JavaScript includes() method to Enable entitlement table

Question asked by Tushar Sutar on May 8, 2018
Latest reply on May 9, 2018 by Tushar Sutar

Hi Team,

 

I am working on request form where target user email address has to be specifically from 'searshc' domain to have him accesses. If user's email address is different than 'xxx@searshc.com' he should not be able to raise request as it won't be provisioned. 

 

So on request form I have added 'Enable' condition to 'Entitlement Table' using JavaScript expression as 

 

avform.user.Email_Address.includes("@searshc")

 

and a separate JavaScript control to show alert that due to incorrect email address they won't be able to raise the request.

 

This works excellent in Google Chrome & Firefox Mozilla but fails for Internet Explorer.

I have checked www.w3schools.com which clearly mentions includes() method only works for IE 12.

 

I doubt that all our business users have IE version equal or higher than 12 but I am sure that lots of users do use IE than Chrome OR Firefox.

 

So how can I enable/ disable 'Entitlement Table' field based on email address checking for sub string '@searshc' in it.

 

Outcomes