• sangeeta.marathe@Futurewise.co
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 57
    Questions
  • 73
    Replies

How can i get parent ID as well as child ID of the field ?

Is both ID's are different with each other ?

I also want to confirm that both record type id will also be different & if YES then how to get both the ID's

Hiii,

I have written one code & in that code 5 files are there,

VFPage

Bean Class

Service Class

Controller Class

Test Class

Now I am getting 67% of trigger after running test so can u please tell me that which code needs to check if the trigger is less than 75%.

Actually I am getting 100% in Bean Class, But 2% in service class & 88%, 70% in other classes...

So should i check service class or there is no rule like this ?

Regards....

 

Can u tell me that what is the actual funda of Parent & Child entity in salesforce ?

When & Why to used parent-to-child relationship or child-to-parent relationship ?

Please give me any general or real life example so that i can easily get it bcoz i understand any concept easily with real life example...

Can u please explain me for what purpose, Record Type has been made in salesforce ?

Please also explain me that why to use it & when to use it ?

Please reply me as soon as possible...

 

public RecTypes__c getPersonRecordType(String accountName)

{ RecTypes__c PersonAccRecordType=[SELECT Name,Record_Type_Value__c FROM RecTypes__c WHERE name=:accountName limit 1]; return PersonAccRecordType; }

 

In the above code i am trying to fetch the where i am trying to fetch rows using record types...

       when i am executing my test class its telling me now rows to fetch.......

      an then it is pointing to this particular method...

      When i am executing my test class queries they are getting inserting properly

   Please help me with this.....

 

 

 

there is roll up summary data type in salesforce.....

currently i am not able to select this data type as it is disabled.....

how can it be enabled......

what shld i do for it

 

if(selRecordTypeName==AssetRecTypes__c.getInstance('Deposits With Bank').Name)

       My above RecordType is not Executing .

       Can i get any other solution please........

Class.ProfilerQuestionControllerTest.test1Data: line 50, column 15 Class.ProfilerQuestionControllerTest.save1Test: line 72, column 9 External entry point

 

Please help me this error bcoz i am not able to figure out it...

String parentId=Apexpages.currentPage().getParameters().get('entityId');
                   String childId=Apexpages.currentPage().getParameters().get('fentityId');

 

 

i am not able to undersatnd y r v fetching parentID and childID    .

I my test class i am using only 1 ID

 

I have created a class consisting of DML queries. I have created a test class for the same.

when i run the test class in my sandbox envt its executing fine.

but when i am executing in my force.com IDE its failing giving me the error as follows.

Type Already Defined.....

Y am i getting this error..

Can i get some help on the same

i am inserting values using test class 

the Query is executing properly in my system log but when i am executing the entire class it is giving me the following error

LIST HAS NO ROWS FOR ASSIGNMENT TO SOBJECT

I have FirstName and LastName as standard Fields in my Account Object List

but I am not able to see them in my page layout. and its not der in the list of fields that i can add.......

Y is it so

What things should be keep in mind while deploying project or single program from Sandbox to Production environment ?

 

I have created one program & it is executing fine in sandboox environment but it is running in production environment & showing me error of code test coverage is of 15% & it must be atleast 75%.

 

The code is as follow...

<!-- Page: -->
<apex:page controller="sampleCon">
    <apex:form>
        <apex:selectRadio value="{!country}">
            <apex:selectOptions value="{!items}"/>
            </apex:selectRadio><p/>
            <apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
     </apex:form>
     <apex:outputPanel id="out">
          <apex:actionstatus id="status" startText="testing..."> 
             <apex:facet name="stop"> 
               <apex:outputPanel> 
                  <p>You have selected:</p> 
                 <apex:outputText value="{!country}"/> 
              </apex:outputPanel> 
            </apex:facet> 
          </apex:actionstatus> 
     </apex:outputPanel> 
</apex:page>
            
/*** Controller ***/
public class sampleCon {
    String country = null;
         
    public PageReference test() {
        return null;
    }
                
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>(); 
        options.add(new SelectOption('US','US')); 
        options.add(new SelectOption('CANADA','Canada')); 
        options.add(new SelectOption('MEXICO','Mexico')); return options; 
    }
                   
    public String getCountry() {
        return country;
    }
                    
    public void setCountry(String country) { this.country = country; }
}

 Now there are two files & Controller : SampleCon & other is VFPage : RadioButton...I uploaded both the files from outbound change set of sandbox environment & I deployed it from inbound change set of production environment but getting test coverage & action gets failed.

 

Please help me...

    Account  Clientacc =new Account(LastName='ABC',PersonMailingStreet='Street',PersonMailingCity='City',

                    PersonMailingState='state',PersonMailingCountry='country',

                    PersonMailingPostalCode='123456',FirstName='DEF',Retirement_Age__c='55',

                    Estimated_Life_Expectancy__c='85',PersonBirthdate=system.today(), RecordTypeId='01220000000DnK3AAK');

 

The above query is giving me the error as bad field name FirstName ,LastName....

When i check in my Account i see FirstNAme and LastName in the standard field list.........

I am working on Person Account....

Y is my query not getting accepted....

Can i get a solution for the same......

i executed my DML query class it is giving me error for the following code

       Account acc= new Account(LastName='ABC',RecordTypeId=RecTypes__c.getInstance('AccountClient').Record_Type_Value__c);

the error that i am geting is as follows

 

System.NullPointerException: Attempt to de-reference a null object

Class.DatabaseDMLTest.myUnitTest7: line 94, column 91 External entry point

 

 

 

can i get y am i getting this error in test class for DML query

i am working on Person account.

is it possible that RecordTypeId is a compulsory value in person account.?

 

Account Clientacc;

I have executed the following query

      Clientacc =new Account(LastName='ABC',PersonMailingStreet='Street',PersonMailingCity='City',

                    PersonMailingState='state',PersonMailingCountry='country',

                    PersonMailingPostalCode='123456',FirstName='DEF',Retirement_Age__c='55',

Estimated_Life_Expectancy__c='85',PersonBirthdate=system.today(), RecordTypeId='01220000000DnK3AAK');

      upsert Clientacc;

when i execute this query with out upsert statement it does not give me any error.

it shows me successfully executed

but when i execute the upsert statment it shows upsert failed. The error which is shown is as follows

 

11:29:45:018 EXCEPTION_THROWN [2]|System.DmlException: Upsert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: id value not valid for the users profile: 01220000000HZ0HAAW: [RecordTypeId]

 

  I know this i hard codded ID which is been used n i have tried every way to solve this but not able to can i please get an help on the same 

can i have custom setting linked/related to a custom created object .

 

Is the Object field while creating a new custom setting related to the objects that are already created..........

 

i am just a beginner on salesforce....

i have created a sample custom object which has fields of name and contact...

i have created the visual force page for the same...

i want to create an apex page to save the data using SOQL queires.

All the examples that i am getting is for standard objects...

Can i get some data for custom objects also.....

Class.ProfilerQuestionControllerTest.test1Data: line 50, column 15 Class.ProfilerQuestionControllerTest.save1Test: line 72, column 9 External entry point

 

Please help me this error bcoz i am not able to figure out it...

i am inserting values using test class 

the Query is executing properly in my system log but when i am executing the entire class it is giving me the following error

LIST HAS NO ROWS FOR ASSIGNMENT TO SOBJECT

What things should be keep in mind while deploying project or single program from Sandbox to Production environment ?

 

I have created one program & it is executing fine in sandboox environment but it is running in production environment & showing me error of code test coverage is of 15% & it must be atleast 75%.

 

The code is as follow...

<!-- Page: -->
<apex:page controller="sampleCon">
    <apex:form>
        <apex:selectRadio value="{!country}">
            <apex:selectOptions value="{!items}"/>
            </apex:selectRadio><p/>
            <apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
     </apex:form>
     <apex:outputPanel id="out">
          <apex:actionstatus id="status" startText="testing..."> 
             <apex:facet name="stop"> 
               <apex:outputPanel> 
                  <p>You have selected:</p> 
                 <apex:outputText value="{!country}"/> 
              </apex:outputPanel> 
            </apex:facet> 
          </apex:actionstatus> 
     </apex:outputPanel> 
</apex:page>
            
/*** Controller ***/
public class sampleCon {
    String country = null;
         
    public PageReference test() {
        return null;
    }
                
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>(); 
        options.add(new SelectOption('US','US')); 
        options.add(new SelectOption('CANADA','Canada')); 
        options.add(new SelectOption('MEXICO','Mexico')); return options; 
    }
                   
    public String getCountry() {
        return country;
    }
                    
    public void setCountry(String country) { this.country = country; }
}

 Now there are two files & Controller : SampleCon & other is VFPage : RadioButton...I uploaded both the files from outbound change set of sandbox environment & I deployed it from inbound change set of production environment but getting test coverage & action gets failed.

 

Please help me...

    Account  Clientacc =new Account(LastName='ABC',PersonMailingStreet='Street',PersonMailingCity='City',

                    PersonMailingState='state',PersonMailingCountry='country',

                    PersonMailingPostalCode='123456',FirstName='DEF',Retirement_Age__c='55',

                    Estimated_Life_Expectancy__c='85',PersonBirthdate=system.today(), RecordTypeId='01220000000DnK3AAK');

 

The above query is giving me the error as bad field name FirstName ,LastName....

When i check in my Account i see FirstNAme and LastName in the standard field list.........

I am working on Person Account....

Y is my query not getting accepted....

Can i get a solution for the same......

i executed my DML query class it is giving me error for the following code

       Account acc= new Account(LastName='ABC',RecordTypeId=RecTypes__c.getInstance('AccountClient').Record_Type_Value__c);

the error that i am geting is as follows

 

System.NullPointerException: Attempt to de-reference a null object

Class.DatabaseDMLTest.myUnitTest7: line 94, column 91 External entry point

 

 

 

can i get y am i getting this error in test class for DML query

 

Clientacc =new Account(LastName='ABC',PersonMailingStreet='Street', PersonMailingCity='City',PersonMailingState='state',PersonMailingCountry='country',                    PersonMailingPostalCode='123456',FirstName='DEF',Retirement_Age__c='55', Estimated_Life_Expectancy__c='85',PersonBirthdate=system.today(), RecordTypeId='01220000000DnK3AAK');     	                                               upsert Clientacc;								system.assertNotEquals(null, Clientacc.id);				Apexpages.currentPage().getParameters().put('entityId',Clientacc.id);
Please explain me the entire code bcoz i am not able to get exactly from where it has taken the RecordTypeId. As it sees that it has been given by the programmer itself as dummy value. Is am i right or it is fetching from the my Object. And also if i want to fetch the value of RecordTypeId from my Object & want to put over there in above mentioned code then how will i achieve it...