I have a button as per below, that will generate a document for the client when clicked.

However, I want to ensure this only fires when a field Job_Number__c has been filled out. And if the field is blank, some sort of error asking for it to be completed.

Can anyone help? I'm not familiar with javascript or apex coding, but hoping this is an easy add?

?serverUrl={!API.Partner_Server_URL_370}  &id={!Opportunity.Id} 
&CurrencyCulture={!Opportunity.Currency_Culture_Codes__c}  &ds7=0 
&SF1=1  &FP0=1  &OFN=LOI
Acknowledgement+{!Opportunity.CPQ_Primary_Quote_Number__c}+ -
+{!Opportunity.Order_LOI_No__c}  &Sc0=1  &sc1=attachments

I got the answer from Conga direct. And so easy, it will use this in the my furture cl;ean ups to avoid various record types and page layouts etc.

Basically, make a formula field to answer 1 or 0, (or use a checkbox field), and within the button use the '&DC=1' and '&DCL=text+text+text' parametersfor any error message to users.



| improve this answer | |

If you end up requiring multiple validations you can use two formula fields:

I called mine Conga Validation Codes (Formula/Number(1,0) and it's a nested IF statement (Case could work here too): EXAMPLE

IF(NOT(ISPICKVAL(Status, "Approved")), 1,
 IF(ISPICKVAL(Status, "Won") || ISPICKVAL(Status, "Contract Signed"), 2, 
  IF(status_updated__c != 0, 3, 
   IF(ISPICKVAL(Pricing_Approval_Status__c, "Approved") && NOT(ISPICKVAL(Type, "New")), 4, 0 

That outputs a number to generate your text in the validation popup within conga from the next formula field, Conga Validation Message (Formula, Text): EXAMPLE

1, "This+is+the+text+for+the+first+error",
2, "This+is+the+text+for+the+second+error",
3, "This+is+the+text+for+the+third+error",
4, "This+is+the+text+for+the+fourth+error",

Then your button will have the following parameters:

&DC={!IF(Quote.Conga_Validation_Codes__c <> 0, "1", "0" )}


Now you're able to check multiple items. The only downside is, if you have multiple errors, they will only show up one at a time from the nested IF statement. So it would have to be resolved after multiple button presses.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.