Posts

Showing posts from December 5, 2014

Show Loading Image on Change Event using Action Status

<div dir="ltr" style="text-align: left;" trbidi="on"> <span style="background-color: #d2eaf1; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold;">High Value Payments</span><b><style> .Processing         {             position: fixed;             background: url('/img/loading32.gif');             background-repeat: no-repeat;             background-position: center;                         width: 100%;             height: 100%;             z-index: 1004;             left: 0%;             top: 0%;         } </style> <apex:form> <apex:actionstatus id="statusProcessing" startstyleclass="Processing"> <apex:commandbutton action="{!onClickSave}" oncomplete="scroll(0, 2);" rerender="idoutPanlMsg" status="statusProcessing" value="Save"> </apex:commandbutto

How to Calculate Sum of Amount and Pass Date Value in Url

if( Apexpages.currentPage().getParameters().get('date') != null && Apexpages.currentPage().getParameters().get('date') != '' ) { string strDate= Apexpages.currentPage().getParameters().get('date'); string[] arrDate = strDate.split('-'); if( arrDate.size() > 2 ) objProject.start_Date__c=date.newInstance( integer.valueof( arrDate[0] ), integer.valueof( arrDate[1] ), integer.valueof( arrDate[2] ) ); } Calculate some of Amount  // Declare Variable {!TEXT(ROUND(Total_due,0))} Total {!TEXT(ROUND(GrandTotal,0))}

Update Record on Custom Button Using JavaScript on Detail Page

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}  var DayPlanRecord = new sforce.SObject("Object Name");  DayPlanRecord.id = "{!ObjectName.Id}";  DayPlanRecord.FieldName = false ;  var recordType = sforce.connection.query("Select ID,FieldName, Name From ObjectName where FieldName = false " );  DayPlanRecord.FieldName = true ; result = sforce.connection.update([DayPlanRecord]);  window.location.reload();