Reputation: 473
We can use the following UserEventScript code to do detect which mode a record is in:
switch (context.type) {
case context.UserEventType.CREATE:
break;
case context.UserEventType.EDIT:
break;
case context.UserEventType.DELETE:
break;
default:
break;
}
But do we have any similar way to know that by ClientScript?
Upvotes: 0
Views: 2502
Reputation: 1794
You can get the mode the record is in using the context.mode
of the pageInit
entry point.
mode
can be copy
, create
, or edit
.
function pageInit(context) {
if (context.mode !== 'create')
return;
// do stuff
});
}
Upvotes: 2