Custom variable for the the "View latest app" button

I am using custom variable to get my environment URL. During an MR , the View latest app button doesnt pick up the custom variable. is it necessary that we use predefined variables or can we use custom variable too?