Create Operation
Creates a single record. The supplied record object is overwritten with the version that is created by the page.
Method Signature
void Create(ref Entity entity)
Parameters
Parameter | Description |
---|---|
entity | Type: Entity A variable of a specific object type that represents the page. |
Results
Result name | Description |
---|---|
entity | Type: Entity A variable of a specific object type that represents the page. Contains the latest values that are present on the page after the record has been inserted into the table. |
Faults
SOAP fault message | Description |
---|---|
The [record name] already exists. Identification fields and values: [field]=[value] | Indicates that the record insertion would violate key constraints. |
Other faults are possible if they are generated by the AL code.
Usage Example
Customer cust = new Customer();
cust.Name = "Customer Name";
service.Create(ref cust);
See Also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for