I have a scenario to pick all the available Files (Invoice files) from Azure service bus queue and process the file inside D365 FO.
{
QueueClient queueClient;
BrokeredMessage message;
{
queueClient = QueueClient.CreateFromConnectionString(connectionString, ReceiveMode.PeekLock);
}
{
message = queueClient.Receive();
}
{
queueClient.Complete(message.LockToken);
}
{
queueClient.Close();
}
}
ReceiveAzureQueue.connect(connectionString);