• benton
  • NEWBIE
  • 30 Points
  • Member since 2011

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

I have a VF page that shows a datatable with a master-child relationship join. I have an input field on the child objects but can not figure out how to save. Everything displays properly but will not save my changes to child objects.

 

VF Page:

   <apex:pageBlockButtons >
           <apex:commandButton action="{!save4}" id="saveButton" value="Save"/>
           <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
    </apex:pageBlockButtons>
    <apex:pageblockTable value="{!acclist}" var="o">
        <apex:column width="10%" style="text-align:center;" headerValue="Name"><apex:outputField value="{!o.name}"/>  </apex:column>
          <apex:column headerValue="Line_Items">
                <apex:pageBlockTable value="{!o.Line_Items__r}" var="a">
                <apex:column width="4%" style="text-align:center;" headerValue="Pay Vendor"><apex:inputField value="{!a.Vendor_Paid__c}"/> </apex:column>
                <apex:column width="4%" style="text-align:center;" headerValue="InvRcd"><apex:outputField value="{!a.Invoiced_Received__c}"/> </apex:column>
                </apex:pageBlockTable>    
          </apex:column>
        </apex:column>
    </apex:pageblockTable>

 

Controller:

        acclist = [Select name, id, (SELECT Name,Invoiced_Received__c, Vendor_Paid__c, Service_Order__c from Line_Items__r) From Account where id IN (Select Vendor__c from Line_Item__c) ORDER BY name];\

     public PageReference save4() {
     update acclist;
return null;
}

 

  • October 18, 2012
  • Like
  • 0

Im a Newbie!

I have a trigger that will insert a post into chatter from my objects "Follow_Up_Action" field. It works when I am in the object detail page but it will not always work on an VF page with an apex repeat list. It seems like it is random and will work sometimes and put all changed fields into the correct objects.T

 

 rigger Code:

trigger chatterFollowUP on Building__c (after update) {
     
     for (Building__c hr : [Select Id, Follow_Up_Action__c, Follow_Up_Date__c from Building__c where Id in: Trigger.New]) 
     {
        Building__c buildingOLD = trigger.old[0];
        Building__c buildingNEW = trigger.new[0];
        if(buildingNEW.Follow_Up_Action__c != buildingOLD.Follow_Up_Action__c)

{

        Id aid = hr.id;
         FeedItem post = new FeedItem();
         post.ParentId = aid2;
         post.Body = hr.Follow_Up_Action__c ; // test to show
         insert post;
           }
    }

}

  • October 18, 2012
  • Like
  • 0

I created a trigger to clone a custom object (service_order__c) if one of its fields called "recurring" is True. When I create/edit my custom object I get maximum trigger depth error. I can not figure out why I am getting that. Please help

 

Trigger:

trigger createRecurring on Service_Order__c(after update, after insert)
{  
    
    List<Service_Order__c> soInsert = new List<Service_Order__c>();
    for (Service_Order__c hr : [Select id,Recurring__c,Building__c, RecordTypeId from Service_Order__c where id in: Trigger.new])
    {
            if(hr.Recurring__c == True){
            Service_Order__c newSO = hr.clone(true);
            soInsert.add(newSO);      
            }
    }
    update soInsert;
}

  • October 16, 2012
  • Like
  • 0

I am trying to call my jquery function but I can not figure out how it works within VF Page. This code works fine on my website but within VF it does not behave.

I need to call my galleria function to load a theme (Styling) and to start a slideshow (run).

 

<script>
    
    var j$ = jQuery.noConflict();
    
    (document).ready(function($) {
      
    Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
    Galleria.run('#galleria');
    });
    </script>

 

Nothing is called. The styling does not change and my gallery is not displayed. Any ideas of what Im doing wrong?

  • October 12, 2012
  • Like
  • 0

I am trying to embedd a snippet of a chatter image into a custom object's visual force page. I have tried using Attachment viewer but it does not render the chatter images as a photo type. Does anyone have any ideas?

  • February 16, 2012
  • Like
  • 0

Is there a way to prepopulate the company field on the Lead Standard Object. We do not use this field and our agents manually enter our company name in that field. Is there a way to have a trigger automatically insert a default company when the lead is created?

  • November 17, 2011
  • Like
  • 0

I have a VF page that shows a datatable with a master-child relationship join. I have an input field on the child objects but can not figure out how to save. Everything displays properly but will not save my changes to child objects.

 

VF Page:

   <apex:pageBlockButtons >
           <apex:commandButton action="{!save4}" id="saveButton" value="Save"/>
           <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
    </apex:pageBlockButtons>
    <apex:pageblockTable value="{!acclist}" var="o">
        <apex:column width="10%" style="text-align:center;" headerValue="Name"><apex:outputField value="{!o.name}"/>  </apex:column>
          <apex:column headerValue="Line_Items">
                <apex:pageBlockTable value="{!o.Line_Items__r}" var="a">
                <apex:column width="4%" style="text-align:center;" headerValue="Pay Vendor"><apex:inputField value="{!a.Vendor_Paid__c}"/> </apex:column>
                <apex:column width="4%" style="text-align:center;" headerValue="InvRcd"><apex:outputField value="{!a.Invoiced_Received__c}"/> </apex:column>
                </apex:pageBlockTable>    
          </apex:column>
        </apex:column>
    </apex:pageblockTable>

 

Controller:

        acclist = [Select name, id, (SELECT Name,Invoiced_Received__c, Vendor_Paid__c, Service_Order__c from Line_Items__r) From Account where id IN (Select Vendor__c from Line_Item__c) ORDER BY name];\

     public PageReference save4() {
     update acclist;
return null;
}

 

  • October 18, 2012
  • Like
  • 0

Im a Newbie!

I have a trigger that will insert a post into chatter from my objects "Follow_Up_Action" field. It works when I am in the object detail page but it will not always work on an VF page with an apex repeat list. It seems like it is random and will work sometimes and put all changed fields into the correct objects.T

 

 rigger Code:

trigger chatterFollowUP on Building__c (after update) {
     
     for (Building__c hr : [Select Id, Follow_Up_Action__c, Follow_Up_Date__c from Building__c where Id in: Trigger.New]) 
     {
        Building__c buildingOLD = trigger.old[0];
        Building__c buildingNEW = trigger.new[0];
        if(buildingNEW.Follow_Up_Action__c != buildingOLD.Follow_Up_Action__c)

{

        Id aid = hr.id;
         FeedItem post = new FeedItem();
         post.ParentId = aid2;
         post.Body = hr.Follow_Up_Action__c ; // test to show
         insert post;
           }
    }

}

  • October 18, 2012
  • Like
  • 0

Hi Everyone, 

 

I'm looking to track opened number of emails from Mass Emails using an HTML Template. 

 

I know this can be done when the email is sent from the Contact/Lead table. 

 

Can this be done using the HTML Email Status Report?

 

Thanks!

  • July 13, 2012
  • Like
  • 0