Display Button based on field value for custom asp page and custom entity

Hoping someone can assist me with an issue am having displaying a button on the screen at the right time. I arrive at this page from a Global Rule in workflow using a Custom File.

I want the button to display only after certain fields on the screen have been populated. For the most part, the button works fine. The button does not display until the fields are populated. However, if I am on the screen and I click the change button-->populate the field-->hit the save button when I am returned to the screen after the save..the button does not appear. However, if I refresh the screen, the button will appear. I tried to find some code to add to the Save Mode of my asp page that is the equivalent of hitting refresh so that the button will appear. However, I am not having any luck.

This is how I have added the button to the screen.

if(CRM.Mode == View || CRM.Mode == Save){
{
if (glprefix == 'undefined' || glprefix == null || glprefix == '')
{
}
else
{
Container.AddButton(CRM.Button("Ready for insert","continue.gif",CRM.Url("CSS/CSS_ReadyBtn.asp")));
}
}
}

Hoping someone can push me in the right direction! Thank you!

  • 0

    Hi Michelle,

    Add the "Act" keys for the screens as well.. use var infoScreen = CRM.getArgs("Act"); if(infoScreen=="200" || infoScreen=="520" || infoScreen=="201") { rest of code..}

    Combine this with the other if statements and this should do the trick!

    Cheers.