Skip to content

Instantly share code, notes, and snippets.

@melamriD365
Created June 8, 2021 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melamriD365/e84dc8dee95e919c44760ebe2b7949ce to your computer and use it in GitHub Desktop.
Save melamriD365/e84dc8dee95e919c44760ebe2b7949ce to your computer and use it in GitHub Desktop.
Modify the labels of the Opportunity Close Quick Create form dynamically according to the context of the opportunity closure.
function onLoad(executionContext){
var formContext = executionContext.getFormContext();
var pageContext = Xrm.Utility.getPageContext();
var isWon = pageContext.input.data.param_won;
if(isWon) formContext.getControl('actualend').setLabel('Win date');
else formContext.getControl('actualend').setLabel('Lose date');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment