1

I'm using Conga to generate documents which are automaticly filled with information from custom objects and fields in SalesForce. To do this I have created buttons and placed them in a custom object. These buttons worked perfectly but when I tried to add one with the same URL in it I received the following error after pressing it:

The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores.

While the name of the button contains underscores, it follows the rules. I use the following name:

make_letter

The button uses the following URL & parameters to fill a template.

/apex/APXTConga4__Conga_Composer 
?id={!Test_Portefeuille__c.Id} 

&QueryID=[B2Cquery]a0DG000000W1Ma6 

&TemplateId=a0LG000000UAawA 

&DS2=1 
&DS3=1 
&DS7=3 
&BML=Offerte+voor+{!Test_Portefeuille__c.Test_Contract__c}+wordt+gemaakt 

&OFN={!YEAR(TODAY())} 
{!LPAD( 
TEXT( 
MONTH( 
TODAY( 
) 
) 
) 
, 2,'0')} 
{!LPAD( 
TEXT( 
DAY( 
TODAY( 
) 
) 
) 
, 2,'0')}+{Template.Label} -+{!Test_Portefeuille__c.Klant__c}

I do not understand why the error is shown. Maybe it has to do with the two underscores in the field names?

0

Here’s my hypothesis as this used to happen to me. When you copy-pasted from the source button to the new target button, you picked up trailing spaces on one or more lines.

Formatting these Conga buttons onto multiple lines for readability is good practice but cloning via copy-paste adds in hidden spaces at the ends of one or more lines from the source of the copy.

  • This seemed to be my problem. I removed the excessive spaces and the buttons worked. Thank you for your reply. I have marked your answer as the right one, however due to my low reputation it won't show. – Ido Young Jun 12 at 14:12
  • I just voted your question up; perhaps you have sufficient rep now. Retry – cropredy Jun 12 at 14:13
  • @IdoYoung - you should be able to click the check mark on the answer w/o any reputation. See salesforce.stackexchange.com/help/someone-answers – cropredy Jun 12 at 14:21

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.