This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} | |
//Before conga runs it makes Create_Client_Approval__c != null | |
var updateClientApproval = new Array(); | |
//search for ID & create client approval from the order that is the child of this //opportunity we're in now | |
var result = sforce.connection.query("SELECT Id, Create_Client_Approval__c FROM Order__c where Opportunity__c = '{!Opportunity__c.Id}' "); | |
//take those results and make an array called records |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF ( ISBLANK (Hard_Ship__c) && ISBLANK (Date_Order_Approved__c), | |
CASE( | |
MOD(today() - DATE(1900, 1, 7), 7), | |
0, (today()) + Total_Turnaround__c + FLOOR((Total_Turnaround__c-1)/5)*2, | |
1, (today()) + Total_Turnaround__c + FLOOR((Total_Turnaround__c)/5)*2, | |
2, (today()) + Total_Turnaround__c + FLOOR((Total_Turnaround__c+1)/5)*2, | |
3, (today()) + Total_Turnaround__c + FLOOR((Total_Turnaround__c+2)/5)*2, | |
4, (today()) + Total_Turnaround__c + FLOOR((Total_Turnaround__c+3)/5)*2, | |
5, (today()) + Total_Turnaround__c + CEILING((Total_Turnaround__c)/5)*2, | |
6, (today()) - IF(Total_Turnaround__c>0,1,0) + Total_Turnaround__c + CEILING((Total_Turnaround__c)/5)*2, |