Issue6226 untested port of IWXQI external business events and power utomate friendly web services#6556
Conversation
…utomate friendly web services from IW
| /// </summary> | ||
| page 20415 "Qlty. Create Inspection API" | ||
| { | ||
| APIVersion = 'v2.0'; |
There was a problem hiding this comment.
why v2.0? Isn't this a new API?
| APIVersion = 'v2.0'; | ||
| APIGroup = 'qualityinspection'; | ||
| APIPublisher = 'insightworks'; | ||
| Caption = 'qltyCreateInspection', Locked = true; |
There was a problem hiding this comment.
Caption has no value in API pages. Please remove
| { | ||
| APIVersion = 'v2.0'; | ||
| APIGroup = 'qualityinspection'; | ||
| APIPublisher = 'insightworks'; |
There was a problem hiding this comment.
I don't think this Microsoft?
| page 20415 "Qlty. Create Inspection API" | ||
| { | ||
| APIVersion = 'v2.0'; | ||
| APIGroup = 'qualityinspection'; |
There was a problem hiding this comment.
| APIGroup = 'qualityinspection'; | |
| APIGroup = 'qualityManagement'; |
| DelayedInsert = true; | ||
| DeleteAllowed = false; | ||
| Editable = false; | ||
| EntityName = 'qltyCreateInspectionOnRecord'; |
There was a problem hiding this comment.
Do not use abbreviations for entityName and entitySetName
| /// <param name="tableName">Text. The table ID, or table name, or table caption.</param> | ||
| /// <param name="tableNameFilter">The table filter that can identify a specific record.</param> | ||
| [ServiceEnabled] | ||
| procedure CreateInspectionFromTableIDAndFilter(var ActionContext: WebServiceActionContext; tableName: Text; tableNameFilter: Text) |
There was a problem hiding this comment.
I don't think this procedure will be exposed as a bound action because of the tableName and tableNameFilter parameter. Please double check in latest version
| /// <param name="tableName">The table ID or table name to create a test</param> | ||
| /// <param name="ActionContext"></param> | ||
| [ServiceEnabled] | ||
| procedure CreateInspectionFromRecordID(var ActionContext: WebServiceActionContext; tableName: Text) |
There was a problem hiding this comment.
What's the need for two bound actions that does essentially the same thing?
There was a problem hiding this comment.
Just convenience/usability in the original code that we ported this from.
CreateTestFromRecordID/CreateInspectionFromRecordID can use the supplied System ID from the name/value buffer as an input in conjunction with the supplied table name to find the record to create the test with.
CreateTestFromTableIDAndFilter/CreateInspectionFromTableIDAndFilter does not use the system id, and instead uses the table filter to find the record.
This comment is just an explanation of how we approached the problem in the original version, there are potentially different patterns that could be used instead.
| systemRecord: Guid; | ||
| currentTable: Integer; | ||
| NoSystemIDRecordErr: Label 'Business Central cannot find a record for the system id of %1', Locked = true; | ||
| OnlyOneRecordForTableAndFilterErr: Label 'Please check your PowerAutomate configuration. 1 record should have been found, but %1 records were found for table %2 and filter %3.', Comment = '%1=the count, %2=the table, %3=the filter'; |
There was a problem hiding this comment.
This error message is not very user friendly
| { | ||
| area(Content) | ||
| { | ||
| repeater(rptTests) |
| /// <summary> | ||
| /// Power automate friendly web service for quality inspections. | ||
| /// </summary> | ||
| page 20414 "Qlty. Inspections API" |
There was a problem hiding this comment.
same comments on first API page applies to this one

Summary
This is an untested port of IW external business events and power automate friendly web services.
Unable to test because it requires publish permission in the MS range on a SaaS system.
Work Item(s)
Fixes #6226
Fixes AB#611285