Custom Task: Loading a different form
app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) { formObj.boundReady(function(){ if (pageForm.viewModel.Source.Name === "DEV_TEST") { console.log("Source = Forslagskasse"); //CODE HERE } }); return; });I need to change the SR form when source=DEV_TEST.
After some digging, I'm assuming I need to set "session.user.ServiceRequestForm", but uncertain as to how.
Answers
Interesting one. Not sure how this could be done off the top of my head. You can set the value of session.user.ServiceRequestForm but its not going to take effect.
How different is the form you want to load, one way would be to use JS to manipulate the Default form to look different?
Geoff