+ Start a Discussion
beentohellbeentohell 

custom button with formula

Hi,

 

I am new to salesforce. I tried to search board, i was not able to find any solution.

 

I tried to create custom button to validate EU vat number. I have a field where Vat number inserted in this format: EU999999999999. to validate i have to separate first two letters and the rest. Tried this, but it is not valdiating. 

 

Could you please help with this?

 

http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms={!LEFT( Account.VAT_number__c,2)&vat={!MID( Account.VAT_number__c ,3,12)}

 

Please help!

 

Thanks.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
klamklam

I just tried creating a detail page button in my sandbox with this URL and it worked:

 

http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms={!LEFT(Account.VAT_number__c,2)}&vat={!MID(Account.VAT_number__c,3,12)}

All Answers

klamklam

You're missing a closing } at the end of the first parameter:

 

http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms={!LEFT( Account.VAT_number__c,2)}&vat={!MID( Account.VAT_number__c ,3,12)}

beentohellbeentohell
klamklam

I just tried creating a detail page button in my sandbox with this URL and it worked:

 

http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms={!LEFT(Account.VAT_number__c,2)}&vat={!MID(Account.VAT_number__c,3,12)}

This was selected as the best answer
beentohellbeentohell

Thank you, Klam!! It is working!!!