Hi Experts,
We have a very weird issue that suddenly we cant get the below code working perfectly. Its partially working actually as it was able to populate the InitiatorEmail field without an issue but its not working for the Title field to populate the Initiator field. I have tried replacing the Title by Name and it was able to get the account of the current logged in user. We suspect that its on the script that we are using so we have tried to use the latest JQuery and SPServices scripts but still got the same result. So, we have tried the below set of scripts.
jquery.SPServices-0.7.2.min.js
jquery-1.6.2.js
jquery.SPServices-2013.01.js
jquery-2.0.3.js
Thank You,
Arnel
We have a very weird issue that suddenly we cant get the below code working perfectly. Its partially working actually as it was able to populate the InitiatorEmail field without an issue but its not working for the Title field to populate the Initiator field. I have tried replacing the Title by Name and it was able to get the account of the current logged in user. We suspect that its on the script that we are using so we have tried to use the latest JQuery and SPServices scripts but still got the same result. So, we have tried the below set of scripts.
jquery.SPServices-0.7.2.min.js
jquery-1.6.2.js
jquery.SPServices-2013.01.js
jquery-2.0.3.js
<script type="text/javascript" src="/RSQE/SCAR/Scripts/jquery-1.6.2.js"></script>
<script type="text/javascript" src="/RSQE/SCAR/Scripts/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
var userName = $().SPServices.SPGetCurrentUser({
fieldName: "Title"
});
$("input[Title='Initiator']").val(userName);
});</script><script type="text/javascript" language="javascript">
$(document).ready(function() {
var userEmail = $().SPServices.SPGetCurrentUser({
fieldName: "EMail"
});
$("input[Title='InitiatorEmail']").val(userEmail);
});</script>
Another thing that we have tried so far is creating a new list and pasting the same code and trying both set of scripts, no difference. However, it works on a newly created Web Application (New Site Collection) but just on the previous JQuery and SPServices scripts (jquery.SPServices-0.7.2.min.js and jquery-1.6.2.js). Any idea or suggestion guys what could be the caused of this issue? This just happens suddenly. We haven't performed any update for the server yet and we already revert all the changes that might have caused this issue but it still persists. Please help.Thank You,
Arnel