User Account Status is showing null for both Active and Inactive users
Hi All,
Am getting a small issue while retrieving the user Account status of a inactive status that it is showing as null. It is showing null for both Active and inactive users. Am using below code in the before update trigger to retrieve the user account status of the sales rep of sale order in Service Request object.
def user=SaleOrderNum_Obj_c?.SalesRep1_Obj_c?.EmailAddress
def vo1 =newView('Resource')
def vc1=newViewCriteria(vo1)
def vc1r=vc1.createRow()
def vc1il1=vc1r.ensureCriteriaItem('EmailAddress')
vc1il1.setOperator('=')
vc1il1.setValue(user)
vc1.insertRow(vc1r)