You are here: RainWorx.FrameWorx.MVC Namespaces > RainWorx.FrameWorx.MVC.Controllers > AdminController Class > CreateField Method (String, Int32, Boolean, String, String, Boolean, String, String, Nullable(Boolean), Int32, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Int32[], Nullable(Boolean))

AdminControllerCreateField Method (String, Int32, Boolean, String, String, Boolean, String, String, NullableBoolean, Int32, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Int32, NullableBoolean)

AuctionWorx 3.5 API
Processes request to create a new custom field in the requested group

Namespace:  RainWorx.FrameWorx.MVC.Controllers
Assembly:  RainWorx.FrameWorx.MVC (in RainWorx.FrameWorx.MVC.dll) Version: 3.5

Syntax

C#
public ActionResult CreateField(
	string Name,
	int Type,
	bool Required,
	string Default,
	string GroupName,
	bool Deferred,
	string DisplayOrder,
	string returnUrl,
	bool? AssignToAllCategories,
	int Visibility,
	int Mutability,
	bool IncludeOnInvoice,
	bool IncludeInSalesReport,
	bool IncludeOnInvoiceAsSeller,
	bool IncludeOnInvoiceAsBuyer,
	bool IncludeInSalesReportAsSeller,
	bool IncludeInSalesReportAsBuyer,
	int[] CategoryId,
	bool? NotDeferred
)

Parameters

Name
Type: SystemString
Requested name for the new custom field
Type
Type: SystemInt32
Integer value of the corresponding CustomFieldType enum (e.g. String = 1)
Required
Type: SystemBoolean
Indicates whether this custom field will be required when available
Default
Type: SystemString
Default value to be pre-filled in the appropriate form(s)
GroupName
Type: SystemString
Name of the group to which the custom field will be assigned
Deferred
Type: SystemBoolean
Indicates whether this custom field will be available in applicable "Create" forms, versus "Edit" forms
DisplayOrder
Type: SystemString
Integer value which determines the order this custom field will be rendered relative to other custom fields
returnUrl
Type: SystemString
the optional url to redirect to upon success
AssignToAllCategories
Type: SystemNullableBoolean
If true, assigns custom field to all categorys (Item only)
Visibility
Type: SystemInt32
an integer value used to specify the level of authority required to view this field value
Mutability
Type: SystemInt32
an integer value used to specify the level of authority required to change this field value
IncludeOnInvoice
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sale invoice line items
IncludeInSalesReport
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sales transaction report CSV exports
IncludeOnInvoiceAsSeller
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sale invoice as seller (User fields)
IncludeOnInvoiceAsBuyer
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sale invoice as buyer (User fields)
IncludeInSalesReportAsSeller
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sales transaction report CSV exports as seller (User fields)
IncludeInSalesReportAsBuyer
Type: SystemBoolean
bool value used to specify if this custom field should be displayed on sales transaction report CSV exports as buyer (User fields)
CategoryId
Type: SystemInt32
optional categor(ies) to associate with the specified custom user field
NotDeferred
Type: SystemNullableBoolean
optional bool value, overrides Deferred when specifying a user field

Return Value

Type: ActionResult
Redirect to /Admin/Fields/[GroupName] (success); Redirect to /Admin/CreateField/[GroupName] (failure)
See Also

Reference

Copyright © 2002-2022. RainWorx Software. All rights reserved.