• geetforce
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi,

 

I have one VF page where I added one command button, on click on this I am redirecting the User to 'New' page of "MyCustomObject" which is Record Type selector page. Now I want to avoid this button click and whenever the User land on this page system should automatically redirect him to New MyCustomObject's page.  But I don't know how to move this logic to Apex.

 

My VF page looks like :

<apex:commandButtonvalue="New Object" action="{!URLFOR($Action.MyCustomObject.New, $ObjectType.MyCustomObject)}"/>

 

 

Thanks in advance.

Hi All, I wrote a test case where I am fetching values from Custom Settings by executing "My_Settings.getValues('Test').myVal__c" statement. Here I am getting NULL POINTER ERROR because "My_Settings.getValues('Test')" line is retuning NULL value but I am getting value when I execute same statement in my controller class even when I tried the same line in Developer console I am getting correct value. I have no idea why I am getting NPE here in the test case where the same test case was working from last month and no buddy modified anything here or any of dependent objects. Does anyone are facing same issue or any one have any idea how to fix this.
Hi, I have a requirement where I have to create one VF page where I have to show all Record Type (same as standard Record Type selection page) along with some extra fields of Case object. I have implemented it by fetching list of Record Types for Case object by hitting [Select * From RecordType where IsActive = true and SobjectType ='Case' ] Now the problem is, we have few Profile where all record types are not visible and I am not able to filter out these record type based on profile. I tried using "with sharing" keyword but this don't help me too. Here My question is, is there any way to filter out all record type which is visible for Logged In user's profile. Thanks in advance.
Hi, On Case creation page, we have on checkbox (at bottom) called 'Assign using active assignment rules'. My requirement is, I have to perform some extra work if User select this checkbox. So is there any way in Trigger/ Apex where we can fetch the value of this checkbox. I guess we don't have any field in Case object and also tried with some code, but I am getting null value in 'opts.AssignmentRuleHeader' field. Case c = Trigger.new[0]; Database.Dmloptions opts = c.getOptions(); System.debug('!@# ' + opts); Thanks in advnace.

HI,

 

I have create one login page and set user name & password as required field.

 

This page is working fine but both fields are not showing reqired icon and when user submit this page with giving any value then User gets wired error message i.e. "j_id0:j_id2:j_id30:j_id33:j_id36: Validation Error: Value is required."

 


<apex:page controller="UserLoginVFC" showHeader="false" sidebar="false">
<br/>

<apex:form >
    <apex:pageMessages />
    
    <apex:pageBlock >
        <apex:pageBlockButtons >
            <apex:commandButton action="{!login}" value="Login" />
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:outputLabel >User Name</apex:outputLabel>
            <apex:inputText value="{!userName}" required="true"/>
        </apex:pageBlockSection>
        
        
        <apex:pageBlockSection >
            <apex:outputLabel >Password</apex:outputLabel>
            <apex:inputSecret value="{!password}" required="true"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>

</apex:page>

 

Thanks! 

Hi,

 

I have one VF page where I added one command button, on click on this I am redirecting the User to 'New' page of "MyCustomObject" which is Record Type selector page. Now I want to avoid this button click and whenever the User land on this page system should automatically redirect him to New MyCustomObject's page.  But I don't know how to move this logic to Apex.

 

My VF page looks like :

<apex:commandButtonvalue="New Object" action="{!URLFOR($Action.MyCustomObject.New, $ObjectType.MyCustomObject)}"/>

 

 

Thanks in advance.

HI,

 

I have create one login page and set user name & password as required field.

 

This page is working fine but both fields are not showing reqired icon and when user submit this page with giving any value then User gets wired error message i.e. "j_id0:j_id2:j_id30:j_id33:j_id36: Validation Error: Value is required."

 


<apex:page controller="UserLoginVFC" showHeader="false" sidebar="false">
<br/>

<apex:form >
    <apex:pageMessages />
    
    <apex:pageBlock >
        <apex:pageBlockButtons >
            <apex:commandButton action="{!login}" value="Login" />
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:outputLabel >User Name</apex:outputLabel>
            <apex:inputText value="{!userName}" required="true"/>
        </apex:pageBlockSection>
        
        
        <apex:pageBlockSection >
            <apex:outputLabel >Password</apex:outputLabel>
            <apex:inputSecret value="{!password}" required="true"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>

</apex:page>

 

Thanks!