I am trying to create a custom URL button in salesforce and when hitting save getting the below error:
Error: Enter a URL that is valid and well-formed
This is the formula I am using:
{
!IF(
AND(
Project__c.RecordType = 'Minor Works Project',
{!NOT(!ISPICKVAL(Project__c.Type__c, 'Training'))})
,
URLFOR("https://datacom--uat.lightning.force.com/lightning/r/Report/00Op0000000cBzHEAU/view?", null,
[fv1=Project__c.Client_Contact__c]),
{!IF(
AND (
Project__c.RecordType = 'Minor Works Project',!ISPICKVAL(Project__c.Type__c, 'Training')
),
URLFOR("https://datacom--uat.lightning.force.com/lightning/r/Report/00Op0000000cBzHEAU/view?", null,
[fv1=Project__c.Client_Contact__c]),
URLFOR("https://datacom--uat.lightning.force.com/lightning/r/Report/00Op0000000cBzHEAU/view?", null,
[fv1=Project__c.Client_Contact__c]))}
)
}
PS: I just copied the URLFOR statement from a previous Help article. I am not sure why and if there is a need for the Null in the URL I used
Any help is deeply appreciated.