You need to sign in to do that
Don't have an account?
Srinivas223
referring currently logged in user and checking for user name in custom setting in Onclick Javascript button
Hello All,
Hope you had a great weekend!
I have a problem in referring to custom setting data and checking if current logged in user name is there in the custom setting. Sounds simple to me but it seems I am doing some mistake and couldnt get the functionality working.
Here is the sample code
I appreciate your help.
Thanks,
Srinivas
Hope you had a great weekend!
I have a problem in referring to custom setting data and checking if current logged in user name is there in the custom setting. Sounds simple to me but it seems I am doing some mistake and couldnt get the functionality working.
Here is the sample code
var user = sforce.connection.getUserInfo(); var customSettingUsers ="select name from Opportunity__c where name = '{!User.Name}' limit 1"; data = sforce.connection.query(customSettingUsers); var customSettingUsersData = data.getArray("records"); if(customSettingUsersData == '') alert('Do you have a reason to click me? If yes contact your System Administrator with your reason');
I appreciate your help.
Thanks,
Srinivas
All Answers