• Jcali
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hello,

 

Was wondering if anyone had any code or ideas on how to only allow certain users the ability to change lead owners in Professional edition?

 

Right now the only option is to disallow all users transfer and only the admin account can override. Don't really want regular users with admin access.

 

Thanks,

  • December 09, 2010
  • Like
  • 0

Hello,

 

Have salesforce professional edition. We have recently been attempting to create a apex/visualforce code that will allow non-admin users to be able to mass transfer leads to others.

 

We previously created a apex/visualforce code that allows this function for mass changing lead status. Here is the lead status change code:

 

 

<apex:page standardController="Lead" recordSetVar="allLeads">
    <apex:form >
        <apex:sectionHeader title="Change status for Leads"/>
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageblockSection title="Change">
                <apex:inputField value="{!Lead.Status}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Selected Leads">
                <apex:pageBlockTable value="{!selected}" var="l">
                    <apex:column value="{!l.Name}"></apex:column>
                    <apex:column value="{!l.Email}"></apex:column>
                    <apex:column value="{!l.Status}"></apex:column>
                </apex:pageBlockTable>
            </apex:pageblockSection>
            <apex:pageBlockSection title="All Leads">
                <apex:pageblocktable value="{!allLeads}" var="AL" id="leadTable">
                    <apex:column value="{!AL.Name}"></apex:column>
                    <apex:column value="{!AL.Email}"></apex:column>
                    <apex:column value="{!AL.Status}"></apex:column>
                </apex:pageblocktable>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
		

 

 

The above code works great for allowing non-admin users to mass change lead status'. Now we attempted to modify the code to allow the same function however now be able to mass change the Lead Owner field with the following code:

 

 

<apex:page standardController="Lead" recordSetVar="allLeads">
    <apex:form >
        <apex:sectionHeader title="Change OWNER for Leads"/>
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageblockSection title="Change">
                <apex:inputField value="{!Lead.Owner}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Selected Leads">
                <apex:pageBlockTable value="{!selected}" var="l">
                    <apex:column value="{!l.Name}"></apex:column>
                    <apex:column value="{!l.Email}"></apex:column>
                    <apex:column value="{!l.Status}"></apex:column>
                </apex:pageBlockTable>
            </apex:pageblockSection>
            <apex:pageBlockSection title="All Leads">
                <apex:pageblocktable value="{!allLeads}" var="AL" id="leadTable">
                    <apex:column value="{!AL.Name}"></apex:column>
                    <apex:column value="{!AL.Email}"></apex:column>
                    <apex:column value="{!AL.Status}"></apex:column>
                </apex:pageblocktable>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

The code seems to validate ok when saving it as a visual force page, however when we run it in the lead view the following error occurs:

 

ERROR
  Error:j_id0:j_id1:j_id3:j_id31:j_id32: An error occurred when processing your submitted information.


  = Required Information Change
Lead Owner
UserQueue
Error: j_id0:j_id1:j_id3:j_id31:j_id32: An error occurred when processing your submitted information.

 

This is after selecting "Save".

 

Does anyone know whats wrong with the code? or could anyone please help us in finding a method for users in Professional edition to be able to Mass change lead status as a non-admin user?

 

Thanks!

  • December 09, 2010
  • Like
  • 0

Hello,

 

Was wondering if anyone had any code or ideas on how to only allow certain users the ability to change lead owners in Professional edition?

 

Right now the only option is to disallow all users transfer and only the admin account can override. Don't really want regular users with admin access.

 

Thanks,

  • December 09, 2010
  • Like
  • 0

Hello,

 

Have salesforce professional edition. We have recently been attempting to create a apex/visualforce code that will allow non-admin users to be able to mass transfer leads to others.

 

We previously created a apex/visualforce code that allows this function for mass changing lead status. Here is the lead status change code:

 

 

<apex:page standardController="Lead" recordSetVar="allLeads">
    <apex:form >
        <apex:sectionHeader title="Change status for Leads"/>
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageblockSection title="Change">
                <apex:inputField value="{!Lead.Status}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Selected Leads">
                <apex:pageBlockTable value="{!selected}" var="l">
                    <apex:column value="{!l.Name}"></apex:column>
                    <apex:column value="{!l.Email}"></apex:column>
                    <apex:column value="{!l.Status}"></apex:column>
                </apex:pageBlockTable>
            </apex:pageblockSection>
            <apex:pageBlockSection title="All Leads">
                <apex:pageblocktable value="{!allLeads}" var="AL" id="leadTable">
                    <apex:column value="{!AL.Name}"></apex:column>
                    <apex:column value="{!AL.Email}"></apex:column>
                    <apex:column value="{!AL.Status}"></apex:column>
                </apex:pageblocktable>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
		

 

 

The above code works great for allowing non-admin users to mass change lead status'. Now we attempted to modify the code to allow the same function however now be able to mass change the Lead Owner field with the following code:

 

 

<apex:page standardController="Lead" recordSetVar="allLeads">
    <apex:form >
        <apex:sectionHeader title="Change OWNER for Leads"/>
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageblockSection title="Change">
                <apex:inputField value="{!Lead.Owner}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Selected Leads">
                <apex:pageBlockTable value="{!selected}" var="l">
                    <apex:column value="{!l.Name}"></apex:column>
                    <apex:column value="{!l.Email}"></apex:column>
                    <apex:column value="{!l.Status}"></apex:column>
                </apex:pageBlockTable>
            </apex:pageblockSection>
            <apex:pageBlockSection title="All Leads">
                <apex:pageblocktable value="{!allLeads}" var="AL" id="leadTable">
                    <apex:column value="{!AL.Name}"></apex:column>
                    <apex:column value="{!AL.Email}"></apex:column>
                    <apex:column value="{!AL.Status}"></apex:column>
                </apex:pageblocktable>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

The code seems to validate ok when saving it as a visual force page, however when we run it in the lead view the following error occurs:

 

ERROR
  Error:j_id0:j_id1:j_id3:j_id31:j_id32: An error occurred when processing your submitted information.


  = Required Information Change
Lead Owner
UserQueue
Error: j_id0:j_id1:j_id3:j_id31:j_id32: An error occurred when processing your submitted information.

 

This is after selecting "Save".

 

Does anyone know whats wrong with the code? or could anyone please help us in finding a method for users in Professional edition to be able to Mass change lead status as a non-admin user?

 

Thanks!

  • December 09, 2010
  • Like
  • 0