• Mohan Chaitanya Palaparthi
  • NEWBIE
  • 30 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 10
    Replies
Hi
    I have an field Number_of_Contacts on Account Object of data type Number. Can any one give the code to solve this.

Regards
Mohan
i have an custom object called Drink_order
in that i have flavor,size and price fields
 i want to autoupdate price field depending upon the user selecting flavor and size
eg: flavor is apple
and size is large

can anyone please help me.
I'm trying to complete Apex Integration Services rest services i  wrote code everything was good but when check challenge i got the error which i have mentioned above
Hi
    I have an field Number_of_Contacts on Account Object of data type Number. Can any one give the code to solve this.

Regards
Mohan

Hello everyone,
I'm new in saleforce and Here i got a problem regarding "Variable does not exist: Name"
I just want to create a visual page and here code and controller class.
Please take a look 

Visualpage code:
<apex:page standardController="Registration__c" extensions="Controller">
     <apex:form > 
         <apex:pageBlock ><center><h1>Registration Form</h1></center></apex:pageBlock>
         <apex:pageBlock title="Student Details" id="1">
                <apex:pageBlockSection title="Jadu">
                        <apex:inputField value="{! Registration__c.Name }"/>
                        <apex:inputField value="{! Registration__c.Father_s_Name__c }"/>        
                        <apex:inputField value="{! Registration__c.Mother_s_Name__c }"/>
                        <apex:inputField value="{! Registration__c.Phone__c }"/>   
                        <apex:inputField value="{! Registration__c.Birth_Date__c}"/>
                        <apex:inputField value="{! Registration__c.Gender__c}"/> 
                        <apex:inputField value="{! Registration__c.Email__c}"/>    
                        <apex:inputField Value="{! Registration__c.Address__c}"/>
                        <apex:inputField value="{! Registration__c.Pincode__c}"/>
                        <apex:inputField value="{! Registration__c.City__c}"/>
                        <apex:inputField value="{! Registration__c.Country__c}"/>
                        <apex:inputField Value="{! Registration__c.State__c}"/> 
                    </apex:pageBlockSection> 
                    <apex:pageBlockButtons location="bottom" >
                         <apex:commandButton action="{!save}" value="Save" />
                         <apex:commandButton action="{!show}" value="Show Registered Student " reRender="a" />
                    </apex:pageBlockButtons> 
            </apex:pageBlock>
            <apex:pageBlock title="Registrated Student" id="a">    
                {! Name} {! FatherName}         
             </apex:pageBlock>
        </apex:form>  
</apex:page>
Class code: 
public with sharing class Controller {
    public String Name;
    public String FatherName;
    public void show(){
       List<Registration__c> Reg = new List<Registration__c>();
        for(Registration__c obj :[select id, Father_s_Name__c,Name from Registration__c])
        {
          Reg.add(obj); 
        }
        Name = Reg.Name;
        FatherName = Reg.Father_s_Name__c;
    }
}
Problem:
Variable does not exist: Name.
Variable does not exist: Father_s_Name__c.
1 in line 0 of Registration page

Hi All,
 i want to Develop a trigger to validate that Opportunity Name should starts with this Format - AccountName :  ,
error message should be "Invalid name, Please start name with Account's Name: " - i want to Use custom label for message.
 i want that whenever new Oppportunity will be created than the naming of Opportunity should be like this - Exp:- Account name is ABC than the Opportunity name should be - ABC : 1234 OR
ABC : XYZ

if its not in this format than error message will be shown.
Any suggestions how to Achieve this?
i have an custom object called Drink_order
in that i have flavor,size and price fields
 i want to autoupdate price field depending upon the user selecting flavor and size
eg: flavor is apple
and size is large

can anyone please help me.
I'm trying to complete Apex Integration Services rest services i  wrote code everything was good but when check challenge i got the error which i have mentioned above
Should SOSL searches return child Contact records of Accounts that match the search criteria when returning only Contacts?

Let's say you have an Account and Contact records represented by the following code:
Account smithServices;
Contact jane;
Contact mary;
Contact michael;

smithServices = new Account(Name = 'Smith Services');
insert smithServices;

jane = new Contact(FirstName = 'Jane', LastName = 'Ada', Account = smithServices);
mary = new Contact(FirstName = 'Mary', LastName = 'Smith');
michael = new Contact(FirstName = 'Michael', LastName = 'Smith');
insert new List<Contact>{jane, mary, michael};
Then perform the following SOSL search returning only Contact records:
List<List<SObject>> searchList = [FIND 'smith' IN NAME FIELDS RETURNING Contact(Name)];

for (SObject contact : searchList[0]) {
    System.debug(contact);
}
The Contact records returned from the SOSL search are:
Contact:{Name=Michael Smith}
Contact:{Name=Mary Smith}
Contact:{Name=Jane Ada}
I would expect the 'Jane Ada' Contact to not be in the results because that record doesn't include a name field that matches the search criteria.  It looks like it is included in the search results because the parent Account record's Name field matches the search criteria.  Is this expected behavor?


 
  • February 26, 2019
  • Like
  • 2