Form Render Logic
Introduction
Form Render Logic supports C# and executes before rendering Document page (including three different modes: Add、Edit、Preview). Please write the code under the Advanced tab of the FormDesign page.
Overall Variable
| Variable name | Type | Remarks |
|---|---|---|
| RouteData | Dictionary<string, object> |
Route information, including customized route variables such as {KEY}, and RouteData["KEY"] can be extracted from the modified object. |
| InputData | Dictionary<string, object> |
Input information, which is consistent with RouteData during initialization. RouteData is used mostly in actual operation. |
| User | CurrentUser | User information of current login user |
| Doc | DynamicMetadata | Current Document information in database, using dataId of URL as search criteria. |
| Service | namespace | Call available API by Service.MethodName() |
Return Object
- Introduction:Return object of Form Render Logic. User can edit InputData and ReturnUrl.
- Object name:ReturnData
- Property details:
| Attribute | Type | Remarks |
|---|---|---|
| Json | string | Not in use |
| RouteData | Dictionary<string, object> |
Default route information |
| InputData | Dictionary<string, object> |
Customized return value, exceptions: key is "metadataData", value is Dictionary, and system can automatically override the default values on the page according to this Dictionary. |
| ReturnUrl | string | Set this parameter, and page automatically jumps to the corresponding URL. |