• bryan.revelant1.37773959363043
  • NEWBIE
  • 0 Points
  • Member since 2013

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

X is a object that has a lookup to itself. X object is also master object to Y. Z is a master of Y. Y is a cross object of X and Z if a new X is created then the user has choice to make the new X a child of a pre existing X If they make the new X a child of a pre existing X, I want to find the parent X in Y then insert the child Xid and any Z values assocaited. Below is what I tried and where I am stuck

 

 

public with sharing class NewClassSiteAudit {

     

public void MyMethod6(list<X__c > PastAudit){     

list<Y__c > Objects2Update = new list< Y__c>();  //creating a container to house the Y__c records that I want to update or insert.    Set<Id> PastXID = new Set<Id>(); //this is container to house ids from Parent ID (PastA) so we can use in query   for(X__c SA : PastA)

{    

PastXID.add(SA.X__c);

}

 

for (Y__c LSTA: [Select id, Z__c , X__c       

       From Y__c  Where X__c in : PastXID ]){ //SOQL is getting all the X parent id's located in Y              

  //Part I am Stuck - what I want.  If the parent ID is within this Y then insert child X and Z values.    

if(  LSTA.X__c  = PastA.get(LSTA.PastXID))  insert  Objects2Update;                                 

  }     

  insert  Objects2Update;        

}         

}

System.DmlException: Update failed. First exception on row 0 with id 006e00000049qyNAAQ; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, GlobalOpportunitySoldOrMissed: execution of AfterUpdate

caused by: System.LimitException: Apex CPU time limit exceeded

 

What does this error message mean?  

 

Thank you!

  • September 09, 2013
  • Like
  • 0

I understand that this is a pretty general Question however I have been trying understand how to build Visual Force pages from scratch. I am running into issues when trying to display the data model/objects when creating a Visual Force Page.

 

I can have one object display data. However when I add one or more tables to the VF i get errors. 

 

Would it be possible for anyone to forward me an example of a VF, Controller and class of how they display three objects on a VF. Basic would be perfect 

 

Best regards, 

I would like to create Public calendar resources programatically. Is this possible via the API? How are resources stored in the db, which table?

 

For example I would like to create:

Room 1 - Active

Room 2 - Active

Room 3 - Active, etc...

 

Any help with this is greatly appreciated.

 

  • August 15, 2011
  • Like
  • 0