function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pupilstuffpupilstuff 

URL not working in custom list button

Hello ,

 

I am trying to use a url in list button on the basis of some condition .But its showing error 'URL can not be found'.

I thnk need to decode the URL , but dont knw how to do it .Please help

 

this is what I am doing

 

{!IF(C_Job__c.mid__c = "ap","/00U/e?what_id=a0PU00000004oBV&retURL=%2Fa0PU00000004oBV" , "https://www.google.com")}

Ankit AroraAnkit Arora

Per my understanding you are executing a Javascript on list button and redirecting to the specified URL

 

So syntax should be something like this :

 

if('{!C_Job__c.mid__c}' == 'ap')
{
     window.location.href = "/00U/e?what_id=a0PU00000004oBV&retURL=%2Fa0PU00000004oBV" ;
}
else
{
     window.location.href = "https://www.google.com" ;
}

 Be careful with while using javascript as it is case sensitive. And make sure when you use any field in java script you use '{!FieldAPI}' .

 

P.S : Please post the topic in relevant section to get fast response.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

pupilstuffpupilstuff

many thankf for reply , but I don't want it hard core ..for example my req is

 

 

I have three layout secondary, higher secondary , graduate

one list button  “quick education page “

one text field “education type”   secondary, higher secondary , graduate

 All in  case object

So if the value is selected as secondary so after clicking on quick education page..the secondary education layout should open

 

And I don’t want to use V/F page for that .. either by URL or by Java script

 

I hope you understand my requirement