You need to sign in to do that
Don't have an account?
Girbson Bijou 8
Update a checkbox field when VF Page is print
Hi want to know if a record is already printed. I have a check box field called IsPrinted And a Visualforce page with a standard Controller. This VF page is rendered as PDF. Please help me to update the field 'IsPrinted' when i print the page. Thanks
Here is a portion of my page
Here is a portion of my page
<apex:page renderAs="PDF" readOnly="true" showHeader="false" sidebar="false" applyHtmlTag="false" standardStylesheets="false" standardController="Delivery__c" applyBodyTag="false" > <!--<apex:stylesheet value="{!$Resource.CSSPrintPageDistrib}" />--> <div class="header"> <div class="col logo"> <apex:image url="{!$Resource.LogoFFP}" width="140" height="60"/> </div> <div class ="col name"> <h2> COMPANY Name </h2> <h6> {!Delivery__c.Beneficiaire__r.Parent.Distribution_Center__c} , {!Delivery__c.Beneficiaire__r.Parent.Address__c } Tels: {!Delivery__c.Beneficiaire__r.Parent.Phone} </h6> </div> <h4>DELIVERY ORDER</h4> <div class="firstBlock" > <div class ="SubfirstBlock"> <div> <b> Code: {!Delivery__c.Name} </b> </div> <div> <b>Prochaine Livraison:</b>------------------------ </div> </div> <div class ="SubfirstBlock"> <div> <b>Status :</b> {!Delivery__c.Delivery_status__c} {!Delivery__c.Control_Status__c} </div> <div> <b> Created By:</b> {!Delivery__c.CreatedBy.FirstName} {!Delivery__c.CreatedBy.LastName} <apex:outputtext value="{0, date, short}"> <apex:param value="{!Delivery__c.CreatedDate}"></apex:param> </apex:outputtext> <br/> </div> </div> </div> <div class = "beneInfo"> <div class ="tableBeneinfo"> <b> Recipient Code : {! Delivery__c.Beneficiaire__r.Ext_ID__c} <br/></b> <b>Name :</b> {!Delivery__c.Beneficiaire__r.Name} <br/> <b>Contact Pers. :</b> {!Delivery__c.RepresentantBenficiaire__c}<br/> <b>Telephone :</b> {!Delivery__c.Beneficiaire__r.Phone}<br/> </div> <div class ="tableBeneinfo"> <b>Category :</b> {!Delivery__c.Beneficiaire__r.Type}<br/> <b>Departement :</b> {!Delivery__c.Beneficiaire__r.Departement__c} <br/> <b>Region :</b> {!Delivery__c.Beneficiaire__r.Commune__c} <br/> <b>Benef. :</b> {!Delivery__c.Beneficiaire__r.Number_of_Beneficiaries__c} <br/> <b>Comments :</b> {!Delivery__c.Comments__c} </div> </div> </div> <div class="footer" > Printed by : {!$User.FirstName} {!$User.LastName} <apex:outputtext value="{0, date, long}"> <apex:param value="{!NOW()}"></apex:param> </apex:outputtext> <br/> As often as you did it for one of my least brothers, you did it for me. Matthiew 25:40 <br/> <div>Page <span class="pagenumber"/> of <span class="pagecount"/></div> </div> <br/> <div class="table"> <div class="tableHeader"> <th>ID </th> <th>Product </th> <th>Quantity </th> <th>UM </th> </div> <apex:repeat var="c" value="{!Delivery__c.Items_distributed__r}"> <!-- <div class="tablebody"> --> <tr > <td>{!c.Product__r.Name}</td> <td>{!c.Productt__c}</td> <td>{!Text(c.Quantity__c)}</td> <td>{!c.UM__c}</td> </tr> <!--</div> --> </apex:repeat> <div class ="recommendation"> En recevant ces articles, vous consentez à:<br/> - ne pas les vendre <br/> - maintenir des archives pouvant etre consultées a tout moment<br/> - les utiliser uniquement au benefice des plus pauvres <br/> - accorder l'acces a vos depots en tout temps aux inspecteurs de Food For the Poor. <b/> <b/> . </div> <div class ="signature" > <div class="tableBeneinfo"> <div>Authorized Signature </div> <br/> <br/> <div>Delivered by </div><div> Date</div> <br/> <br/> <div>Received by </div><div> Date </div> <br/> <br/> </div> <div class="tableBeneinfo"> <div>Controlled by </div><div> Date </div> <br/> <br/> <div>Register by </div><div> Date</div> <br/> <br/> <div>Vehicule information </div><div> Date</div> </div> </div> </div> </apex:page>