• Avik Datta
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
We are having user license related list under Company Information as below.

User License list

I need to show that information only in a VF page. It is fine if we can able to show only this section of Company information.

Anybody is having any idea on this.Please reply.
Currently I need your expert help to solve one requirement. Hopefully you will help me.
 
Requirement
One VF page which will show a list of User(Manage User) data. And  user will able to update Active field from that list. Means user can uncheck Active field and save so that User will be inactive in database.
 
My Implementation
I have created a custom controller to fetch specific set of user data. Please find below apex code


public class ReportController{
                 public List<User> reportRecord{
                 get{
                            return [SELECT Name,Username,Country_Code_AZ__c,LastLoginDate,Datediffcalc__c,IsActive  FROM User WHERE Datediffcalc__c > 90 and IsActive=true order by Country_Code_AZ__c];   
                 }
                set;
                   }   
      public PageReference QuickSave(){
               return null;   
                 }
}
 Also created a VF page where Active field is editable, please find below page code
 
<apex:page controller="ReportController">
<apex:form >
    <apex:pageBlock title="Users List">
    <apex:commandButton value="Inactive User" action="{!Quicksave}"/>
   
        <apex:pageBlockTable value="{!reportRecord}" var="val">
            <apex:column headerValue="Name" value="{!val.Name}"/>
            <apex:column headerValue="Username" value="{!val.Username}"/>
            <apex:column headerValue="Country Code" value="{!val.Country_Code_AZ__c}"/>
            <apex:column headerValue="LastLoginDate" value="{!val.LastLoginDate}"/>
            <apex:column headerValue="Days Since Last Login" value="{!val.Datediffcalc__c}"/>
            <apex:column headerValue="Active">
                <apex:inputField value="{!val.IsActive }"/>
            </apex:column>
 
        </apex:pageBlockTable>
  </apex:pageBlock>
 
  <apex:commandButton value="Inactive User" action="{Quicksave}"/>
  </apex:form>
</apex:page>
 
 
Problem Statement
Actually I am unable to write edit code under PageReference QuickSave() so that when user unchecked that flag and click on save , the updated value will be saved.
 
Please help me on the above situation or if you have any doc or video which implement same, please forward to me.
We are having user license related list under Company Information as below.

User License list

I need to show that information only in a VF page. It is fine if we can able to show only this section of Company information.

Anybody is having any idea on this.Please reply.
Currently I need your expert help to solve one requirement. Hopefully you will help me.
 
Requirement
One VF page which will show a list of User(Manage User) data. And  user will able to update Active field from that list. Means user can uncheck Active field and save so that User will be inactive in database.
 
My Implementation
I have created a custom controller to fetch specific set of user data. Please find below apex code


public class ReportController{
                 public List<User> reportRecord{
                 get{
                            return [SELECT Name,Username,Country_Code_AZ__c,LastLoginDate,Datediffcalc__c,IsActive  FROM User WHERE Datediffcalc__c > 90 and IsActive=true order by Country_Code_AZ__c];   
                 }
                set;
                   }   
      public PageReference QuickSave(){
               return null;   
                 }
}
 Also created a VF page where Active field is editable, please find below page code
 
<apex:page controller="ReportController">
<apex:form >
    <apex:pageBlock title="Users List">
    <apex:commandButton value="Inactive User" action="{!Quicksave}"/>
   
        <apex:pageBlockTable value="{!reportRecord}" var="val">
            <apex:column headerValue="Name" value="{!val.Name}"/>
            <apex:column headerValue="Username" value="{!val.Username}"/>
            <apex:column headerValue="Country Code" value="{!val.Country_Code_AZ__c}"/>
            <apex:column headerValue="LastLoginDate" value="{!val.LastLoginDate}"/>
            <apex:column headerValue="Days Since Last Login" value="{!val.Datediffcalc__c}"/>
            <apex:column headerValue="Active">
                <apex:inputField value="{!val.IsActive }"/>
            </apex:column>
 
        </apex:pageBlockTable>
  </apex:pageBlock>
 
  <apex:commandButton value="Inactive User" action="{Quicksave}"/>
  </apex:form>
</apex:page>
 
 
Problem Statement
Actually I am unable to write edit code under PageReference QuickSave() so that when user unchecked that flag and click on save , the updated value will be saved.
 
Please help me on the above situation or if you have any doc or video which implement same, please forward to me.