// Import the following namespace
using PowerPortalsPro.Web.Common.Services;
[Inject]
private IPowerPortalsProService _powerPortalsProService { get; set; } = null!;
protected override async Task OnInitializedAsync()
{
var accountRecord = await _powerPortalsProService.RetrieveRecordAsync("account", new Guid("C1B164A8-7A8C-4F7E-9209-2CEE71E58A99"));
// Do stuff with the account record
}
IPowerPortalsProService Class
Methods
Name | Parameters | Type | Description |
---|---|---|---|
AssociateAsync | TableRecordReference record string relationshipName IEnumerable<TableRecordReference> relatedRecords | Task<AssociateResponse> | Associate one record with one or more other records. |
CreateRecordAsync | TableRecord record | Task<CreateResponse> | Create a record in Dataverse. |
DeleteRecordAsync | string tableLogicalName Guid id | Task<DeleteResponse> | Delete a record from Dataverse. |
DisassociateAsync | TableRecordReference record string relationshipName IEnumerable<TableRecordReference> relatedRecords | Task<DisassociateResponse> | Remove an association from one record with one or more other records. |
ExecuteAsync | RequestBase request | Task<ResponseBase> | Execute a request. |
ExecuteMultipleAsync | IEnumerable<RequestBase> requests bool returnResponses | Task<List<ResponseBase>> | Execute multiple requests in a single database transaction. |
GetFileInfoAsync | string tableName Guid recordId string columnName bool includeData | Task<FileInfo> | Retrieve a file and optionally its data from Dataverse. |
RetrieveRecordAsync | string tableLogicalName Guid id | Task<TableRecord> | Retrieve a record from Dataverse. |
RetrieveRecordsAsync | string fetchXml | Task<RetrieveRecordsResponse> | Retrieve multiple records from Dataverse by specifying the FetchXml query. |
RetrieveTableMetadataAsync | string tableLogicalName | Task<TableMetadata> | Retrieve table metadata from Dataverse. |
RetrieveViewMetadataAsync | Guid viewId | Task<ViewMetadata> | Retrieve view metadata from Dataverse. |
UpdateRecordAsync | TableRecord record | Task<UpdateResponse> | Update a record in Dataverse. |