You need to sign in to do that
Don't have an account?
Jyosi jyosi
Need to pass the values from class to other
I Have class where i am writing all the queries and calling into the other class .
I need to the get the custom setting values from class B to class A and assign to variable in class A.
Here is the code in Class B.
public String ABC()
{
List<User> ListUserValues= getCurrentUserInfoById(userinfo.getUserId());
for(User UserValues :ListUserValues)
{
if(UserValues.Location__c=='US')
{
AuthenticationSettings__c GLIntegration = AuthenticationSettings__c .getAll().get('SAP_Universal');
UserName=Integration.User__c;
Password=ntegration.Password__c;
EndPoint=ntegration.EndPoint__c;
UserDet = UserName + ':' + Password;
}
}
I need to get UserDet and endpoint variable in Class A.
Can you help me how to get the value into class A.
Thanks for help
Regards,
Jyo
I need to the get the custom setting values from class B to class A and assign to variable in class A.
Here is the code in Class B.
public String ABC()
{
List<User> ListUserValues= getCurrentUserInfoById(userinfo.getUserId());
for(User UserValues :ListUserValues)
{
if(UserValues.Location__c=='US')
{
AuthenticationSettings__c GLIntegration = AuthenticationSettings__c .getAll().get('SAP_Universal');
UserName=Integration.User__c;
Password=ntegration.Password__c;
EndPoint=ntegration.EndPoint__c;
UserDet = UserName + ':' + Password;
}
}
I need to get UserDet and endpoint variable in Class A.
Can you help me how to get the value into class A.
Thanks for help
Regards,
Jyo
public class A{
public void method1(){
B b = new B();
string customsettingValue = b.ABC();
//if you write it as static you could do following,
string customersettingValue = B.ABC();
}
}