• divyanshu
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

Hi everyone,

 

Can we Update User role using apex code.??

 

Please give me Pseduo code if there is any.

 

Thanxs

Divyanshu

Hi everyone

 

Can we setup Password for the user using apex code.

 

If so,then plz give me some hint.

 

thanxs in advance

 

regards

divyanshu

HI Everyone,

 

public class TestPage
    {
     public String id{get; set;}
      Boolean userIdNotFound = false;
    List<opportunitywrapper> opportunityList = new List<opportunitywrapper>();//for opportunity
        List<opportunity> selectedopportunity = new List<opportunity>();//for opportunity
        public List<opportunitywrapper> getopportunity()
        {
            for(opportunity o : [select Id, Name from Opportunity Where id =:ApexPages.currentPage().getParameters().get('id')])
            opportunityList.add(new opportunitywrapper(o));
            return opportunityList ;
        }
         public PageReference getSelectedopp()
        {
            selectedopportunity.clear();
            for(opportunitywrapper oppwrapper: opportunityList)
            if(oppwrapper.selected == true)
            selectedOpportunity.add(oppwrapper.opp);
            return null;
        }
        public List<opportunity> GetSelectedopportunity()
        {
            if(selectedopportunity.size()>0)
            return selectedopportunity;//Update Account here
            else
            return null;
        }   
        public class opportunitywrapper
        {
        public opportunity opp{get; set;}
            public Boolean selected {get; set;}
            public opportunitywrapper(opportunity o)
            {
                opp= o;
            selected = false;
            }
        }
    }

 

The above code is working fine when i give any opportunity id on the url to get the opportunit name.

My problem is that when i get the records in list i dnt want to show them on the page and update the account associated with that opportunity.

 

Please help on this as i am new to the salesforce.

Thanxs in advance

Regards

Divyanshu

 

Hi Everyone,

 

how to get all the objects with their  fields using apex page and class.

 

like,if i select lead from the dropdown menu then its shows all the lead fields and if i select oppurtunity then its show all the oppurtunity fields.

 

Please help me on this

 

as i am new to the salesforce

 

Thanxs in advance

 

Regards

Divyanshu

Hi everyone,

 

Can we Update User role using apex code.??

 

Please give me Pseduo code if there is any.

 

Thanxs

Divyanshu

HI Everyone,

 

public class TestPage
    {
     public String id{get; set;}
      Boolean userIdNotFound = false;
    List<opportunitywrapper> opportunityList = new List<opportunitywrapper>();//for opportunity
        List<opportunity> selectedopportunity = new List<opportunity>();//for opportunity
        public List<opportunitywrapper> getopportunity()
        {
            for(opportunity o : [select Id, Name from Opportunity Where id =:ApexPages.currentPage().getParameters().get('id')])
            opportunityList.add(new opportunitywrapper(o));
            return opportunityList ;
        }
         public PageReference getSelectedopp()
        {
            selectedopportunity.clear();
            for(opportunitywrapper oppwrapper: opportunityList)
            if(oppwrapper.selected == true)
            selectedOpportunity.add(oppwrapper.opp);
            return null;
        }
        public List<opportunity> GetSelectedopportunity()
        {
            if(selectedopportunity.size()>0)
            return selectedopportunity;//Update Account here
            else
            return null;
        }   
        public class opportunitywrapper
        {
        public opportunity opp{get; set;}
            public Boolean selected {get; set;}
            public opportunitywrapper(opportunity o)
            {
                opp= o;
            selected = false;
            }
        }
    }

 

The above code is working fine when i give any opportunity id on the url to get the opportunit name.

My problem is that when i get the records in list i dnt want to show them on the page and update the account associated with that opportunity.

 

Please help on this as i am new to the salesforce.

Thanxs in advance

Regards

Divyanshu

 

Hi Everyone,

 

how to get all the objects with their  fields using apex page and class.

 

like,if i select lead from the dropdown menu then its shows all the lead fields and if i select oppurtunity then its show all the oppurtunity fields.

 

Please help me on this

 

as i am new to the salesforce

 

Thanxs in advance

 

Regards

Divyanshu