• Vineela Proddaturu
  • NEWBIE
  • 30 Points
  • Member since 2022

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
I am trying to built a VF page. I wrote tags for labels and their input box but i was able to create only Labels not along with their Input Box. here is my VF Tags

<apex:page standardController="contact">
 <apex:form>
    <apex:sectionHeader title="Contact" subtitle="New Contact"/>
    <p> Contacts not associated with accounts are private and cannot be viewed by other  users or included in reports.</p>
    <apex:pageblock title="Contact Edit" Tabstyle="Contact">
   <apex:pageblocksection title="Contact Information"     columns="1" Collapsible="True">
    
       <apex:pageBlockSectionItem>
        <apex:outputLabel value="First Name"/>
        <apex.inputText value="{!Contact.FirstName}"/>
      </apex:pageBlockSectionItem>
       
       <apex:pageBlockSectionItem>
       <apex:outputlabel value="Last Name"/>
       <apex.inputText value="{!Contact.LastName}"/>
    </apex:pageBlockSectionItem>
       
        <apex:pageBlockSectionItem>
            <apex:outputlabel value="BirthDate"/>
            <apex.inputText value="{Contact.birthdate}"/>
    </apex:pageBlockSectionItem>
    </apex:pageblocksection>
                                                                       
    </apex:pageblock>
    </apex:form>
</apex:page>      
if account  billing address is update then related contact mailingaddress is also update???

Create a Trigger on the Account Object, to make sure each Account Record should have "Rating, Phone and Fax Field values".

   

    Object Name : Account Object.

    Event Name  : Before Insert.

   

    trigger AccountsTrigger on Account (before insert) 

    {

        if(Trigger.isInsert && Trigger.isBefore)

        {

            for(Account accRecord : Trigger.New)

            {

                if(accRecord.Rating == Null || accRecord.Rating == '')

                    accRecord.Rating.AddError('Please Select the Rating Value.');

                else if(accRecord.Phone == Null || accRecord.Phone == '')

                    accRecord.Phone.AddError('Please Enter the Contact Number.');

                else if(accRecord.Fax == Null || accRecord.Fax == '')

                    accRecord.Fax.AddError('Please Enter the Fax Number.');

            }

        }

    }

   

I am trying to built a VF page. I wrote tags for labels and their input box but i was able to create only Labels not along with their Input Box. here is my VF Tags

<apex:page standardController="contact">
 <apex:form>
    <apex:sectionHeader title="Contact" subtitle="New Contact"/>
    <p> Contacts not associated with accounts are private and cannot be viewed by other  users or included in reports.</p>
    <apex:pageblock title="Contact Edit" Tabstyle="Contact">
   <apex:pageblocksection title="Contact Information"     columns="1" Collapsible="True">
    
       <apex:pageBlockSectionItem>
        <apex:outputLabel value="First Name"/>
        <apex.inputText value="{!Contact.FirstName}"/>
      </apex:pageBlockSectionItem>
       
       <apex:pageBlockSectionItem>
       <apex:outputlabel value="Last Name"/>
       <apex.inputText value="{!Contact.LastName}"/>
    </apex:pageBlockSectionItem>
       
        <apex:pageBlockSectionItem>
            <apex:outputlabel value="BirthDate"/>
            <apex.inputText value="{Contact.birthdate}"/>
    </apex:pageBlockSectionItem>
    </apex:pageblocksection>
                                                                       
    </apex:pageblock>
    </apex:form>
</apex:page>      

Hi Can I have many phone fields in one validation rule? For example, phone, work, mobile and emergency contact. I am using this formula. So my question is can I add more fields to this formula and if so, HOW? I have tried different things and no luck. 


AND(
OR(
ISNEW(),
ISCHANGED(Phone)
),
NOT(ISBLANK(Phone)),
NOT(REGEX(Phone, "\\D?(\\d{3})\\D?\\D?(\\d{3})\\D?(\\d{4})$"))
)

  • April 12, 2022
  • Like
  • 0