• gb ws
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All, i am trying to write one condition to open Data Import wizard if opportunity is not closed lost. also to throw a message if opportunity is closed lost, but its not working. can you please have a look.

{! IF(Opportunity.StageName != "Closed Lost", "/lightning/setup/DataManagementDataImporter/home", "XXXXXXXXXXXXXX) }  

also i am trying   below one

if({!Opportunity.StageName=="Closed Lost"}){
    alert("Opportunity is Closed Lost, Learner Can not be uploaded");
}
else{
    window.top.location.href =
        "/lightning/setup/DataManagementDataImporter/home";
}

its not working .