You need to sign in to do that
Don't have an account?

Passing Parameter in Apex Controller
I am not able to pass the parameter in Apex Controller. Below is the my Code.
public assigntechniciancontroller(ApexPages.StandardController controller) {
accID = ApexPages.currentPage().getParameters().get('Id');
skill = ApexPages.currentPage().getParameters().get('Problem__c');
system.debug ('@@@@@@@@@@@' +skill);
}
Problem__c is the picklist field on Standard WorkOrder Object. I am getting the null in Problem__c field. Kindly help me on this.
Thanks in Advance.
public assigntechniciancontroller(ApexPages.StandardController controller) {
accID = ApexPages.currentPage().getParameters().get('Id');
skill = ApexPages.currentPage().getParameters().get('Problem__c');
system.debug ('@@@@@@@@@@@' +skill);
}
Problem__c is the picklist field on Standard WorkOrder Object. I am getting the null in Problem__c field. Kindly help me on this.
Thanks in Advance.
Please replace your controller with mine and try again and let me know if you face any issue.
All Answers
VisualForce Page:
=========
<apex:page standardcontroller="WorkOrder" extensions="assigntechniciancontroller" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!uList}" var="cl">
<apex:column headervalue="Set as Primary">
<apex:outputPanel id="counter2">
<input type="radio" name="sel" />
<apex:actionsupport action="{!process}" event="onchange" rerender="abc">
<apex:param name="select" value="{!cl.id}" assignTo="{!str}"/>
</apex:actionsupport>
</apex:outputPanel>
</apex:column>
<apex:column value="{!cl.Name}"/>
<apex:column value="{!cl.Skill__c}"/>
</apex:pageblockTable>
</apex:pageBlock>
<apex:commandButton value="Save" action="{!SaveOwner}" disabled="{!flag}" id="abc"/>
</apex:form>
</apex:page>
Apex Controller:
=========
public class assigntechniciancontroller {
Private Id accID;
Public String skill;
Public string str {get;set;}
Public Boolean flag {get;set;}
public List<User> uList{get;set;}
public assigntechniciancontroller(ApexPages.StandardController controller) {
accID = ApexPages.currentPage().getParameters().get('Id');
skill = ApexPages.currentPage().getParameters().get('Problem__c');
system.debug ('@@@@@@@@@@@' +skill);
if (skill != null)
{
uList = [select Name, Skill__C from User ];
}
}
I am not getting skill value in debug. Kinldy help me on this issue.
Please replace your controller with mine and try again and let me know if you face any issue.