function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shravya Rama 9Shravya Rama 9 

Immeadite = true not working even with action region

VF PAGE:
<apex:inputField label="Fahrer" value="{!res.Fahrer__c}"   />
<apex:actionRegion>
<apex:commandButton value="Retrieve User Details" rerender="out"  immediate="true"  >
<apex:actionSupport event="onclick" action="{!LoadingUserDetails}"   />
</apex:commandButton>
</apex:actionRegion>

<apex:pageBlockSection id="out"> 
<apex:inputField label="Contact Nummer" value="{!res.Contact_Number__c}" rendered="true" id="out" />             
</apex:pageBlockSection> 

<apex:inputField label="Starts at" value="{!Reservation__c.Start__c}"  required="true"/>
<apex:inputField label="Ends at" value="{!Reservation__c.End__c}" required="true"/>
APEX CLASS:

public pagereference LoadingUserDetails(){

currentuser=[Select Id,phone from User where Id=:res.Fahrer__c limit 1];
system.debug('changeduser:'+currentuser);
res.Contact_Number__c = currentuser.phone ;

return null;
}
Rerendering works fine without validation rules but not with. so I chose immeadite = true wrapped in active region but still it doesnt work. Can somebody suggest a solution please.
 
Hemant_SoniHemant_Soni
Hi Shravya Rama
You have try this 
<apex:actionSupport event="onclick" action="{!LoadingUserDetails}"  immediate="true" />
if this help you please mark as solved.
thanks 
Hemant
 
Shravya Rama 9Shravya Rama 9
Hello Hemant,
I have tried all the alternatives. Also tried calling the function directly from the command button without action support but is still in vain.