• Sapana
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 13
    Replies

Hi,

 

I was writting a trigger to update field value in parent object with child object's value:

Product--- Custom Parent Object

Product Period Data---Custom Child Object

field to update in parent object ---Days_Delinquent__c

 

 

 

trigger UpdateProduct on ENT_NMTC_Product_Period_Data__c (after insert)
{
    
    for(ENT_NMTC_Product_Period_Data__c ppd : System.Trigger.New)
     {           
            ENT_NMTC_Product__c prod = new ENT_NMTC_Product__c();
            
            ppd.NMTC_Product__r.Days_Delinquent__c = ppd.Days_Delinquent__c;
            update(prod); 
            
         
        
     }
   

 

I am not getting any error message in trigger but it does not satisfy the purpose too

  • December 05, 2012
  • Like
  • 0

I have two objects Partnership and Participant where Participant is a child object of Partnership object in a Master Detail relationship.

I have a picklist  "Partnership Type "  on Partnership object with values {LP , LLC}  and other two picklist on Participant object named  "Partnership Type " with values {LP , LLC}  & "Participant Role" with values {A,B,C,D,E,F} . Partnership Type is controlling picklist  and Participant Role is dependent picklist

Now suppose I select a picklist value for "Partnership Type " in Partnership record then a child Participant record for that  shows only those values for Participant Role which are relevant to its controling picklist field

How could this be done? reply

  • November 04, 2012
  • Like
  • 0

Hi

 

I want to write a test case for a trigger which inserts "ENT_NMTC_Fund_Partnership__c"  record on insertion of  "ENT_NMTC_Fund__v" record

Could anyone help me in writing  a test case for this trigger since I am new to Apex Programming

Here is the trigger and its working fine

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

trigger ENT_Trigger_insert_NMTCPartnership on ENT_NMTC_Fund__c(after insert)
{
   
       for (ENT_NMTC_Fund__c fund:Trigger.new)
       {      
                  
              ENT_NMTC_Fund_Partnership__c partnership = new ENT_NMTC_Fund_Partnership__c();     
              partnership.Name =fund.Name ;  
               
                      
              partnership.NMTC_Fund__c= trigger.new[0].Id;          
              insert partnership;                                              
           }  
 
 
}

 

 

 

  • November 01, 2012
  • Like
  • 0

I have two custom object Leave_Application__c and Public_Holiday__c

Leave_Application__c has lookup  relation with Public_Holiday__c

Now how can i calculate Leave_Days__c which is a formula field excluding public holidays and weekends

hi,

 

I have a custom object, Leave_Application__c now when i click on edit button of  Leave_Application__c record  den i shd get  a custom VF page in edit mode and after that when i save a record i shd get the same VF page in detail mode

 

Is this possible??

Plz tell me how

Hi

 

I have two objects A and B 

B has MasterDetail relationship with A

how can I  write a trigger to insert a record In object B on update of field in a record of  object A

On insertion or updation on records of object (say A ) i want insert or update to be reflected in two other objects (say B and C)

Object A consist of fields from Band C 

B and C have master detail relationship between them

how can i write a trigger for same?

how do we get Id of the current page??

I wanted to display list on records of object  on a detail page of some other object

I have done so by using pageblock table, but i want to display edit and delete link adjacent to each record and also a new record button  similar to that in a related list. how could this be done?

I want to generate an Id which I would enter in URL to access records and which is easy to remember

I have say ,3 objects A, B & C.

B has MasterDetail relationship with object C and Lookup relationship with object A

Now on detail page of object A  record I want to display corresponding records from object C

How could this be done using VF and apex?

I have say ,3 objects A, B & C.

B has MasterDetail relationship with object C and Lookup relationship with object A

Now on detail page of object A  record I want to display corresponding records from object C

How to align elements such as inputtext etc on vf page?

  • April 25, 2012
  • Like
  • 0

Is there any way by which we can have 2 lookup field on child object which refer to same parent object(parent object is a standard object in my case)

  • February 02, 2012
  • Like
  • 0

Is there any way by which we can have 2 lookup fields on an child object which refer to same parent object

  • January 30, 2012
  • Like
  • 0

I am trying to display a field from an object on a vf page which is  actually  a lookup field on that object and it is of text  data type ,

Instead of text value the  field is displaying  an Id value

  • January 30, 2012
  • Like
  • 0

Can the display of fields in the lookup window can be customized?

Instead of showing object name field  I want to show some other custom field

  • January 30, 2012
  • Like
  • 0

Can  we access fields from the custom objects which are not directly related to each other  in a visual force page ?How?

  • January 28, 2012
  • Like
  • 0

When I create a vf page with renderAs="PDF " attribute it displays an outputfield  as DATETIME  field  though  having a data type as DATE

  • January 23, 2012
  • Like
  • 0

Can we change the label name of a standard object  or clone the standard object?

  • January 20, 2012
  • Like
  • 0

Hi,

 

I was writting a trigger to update field value in parent object with child object's value:

Product--- Custom Parent Object

Product Period Data---Custom Child Object

field to update in parent object ---Days_Delinquent__c

 

 

 

trigger UpdateProduct on ENT_NMTC_Product_Period_Data__c (after insert)
{
    
    for(ENT_NMTC_Product_Period_Data__c ppd : System.Trigger.New)
     {           
            ENT_NMTC_Product__c prod = new ENT_NMTC_Product__c();
            
            ppd.NMTC_Product__r.Days_Delinquent__c = ppd.Days_Delinquent__c;
            update(prod); 
            
         
        
     }
   

 

I am not getting any error message in trigger but it does not satisfy the purpose too

  • December 05, 2012
  • Like
  • 0

Hi

 

I want to write a test case for a trigger which inserts "ENT_NMTC_Fund_Partnership__c"  record on insertion of  "ENT_NMTC_Fund__v" record

Could anyone help me in writing  a test case for this trigger since I am new to Apex Programming

Here is the trigger and its working fine

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

trigger ENT_Trigger_insert_NMTCPartnership on ENT_NMTC_Fund__c(after insert)
{
   
       for (ENT_NMTC_Fund__c fund:Trigger.new)
       {      
                  
              ENT_NMTC_Fund_Partnership__c partnership = new ENT_NMTC_Fund_Partnership__c();     
              partnership.Name =fund.Name ;  
               
                      
              partnership.NMTC_Fund__c= trigger.new[0].Id;          
              insert partnership;                                              
           }  
 
 
}

 

 

 

  • November 01, 2012
  • Like
  • 0

hi,

 

I have a custom object, Leave_Application__c now when i click on edit button of  Leave_Application__c record  den i shd get  a custom VF page in edit mode and after that when i save a record i shd get the same VF page in detail mode

 

Is this possible??

Plz tell me how

Hi

 

I have two objects A and B 

B has MasterDetail relationship with A

how can I  write a trigger to insert a record In object B on update of field in a record of  object A

On insertion or updation on records of object (say A ) i want insert or update to be reflected in two other objects (say B and C)

Object A consist of fields from Band C 

B and C have master detail relationship between them

how can i write a trigger for same?

how do we get Id of the current page??

I have say ,3 objects A, B & C.

B has MasterDetail relationship with object C and Lookup relationship with object A

Now on detail page of object A  record I want to display corresponding records from object C

Is there any way by which we can have 2 lookup fields on an child object which refer to same parent object

  • January 30, 2012
  • Like
  • 0

Can  we access fields from the custom objects which are not directly related to each other  in a visual force page ?How?

  • January 28, 2012
  • Like
  • 0

Can we change the label name of a standard object  or clone the standard object?

  • January 20, 2012
  • Like
  • 0