I read data from Excel and save data in a data table, then load data into Queue
While getting transaction items one by one from the Queue for one field, I am getting the error Object reference not set to an instance of an object.
In Excel, the business phone value is empty. I need to verify all the phone numbers
I added screen shot for reference please help me out to resolve this
@Sushma_Ganapatisa
The error “Object reference not set to an instance of an object” occurs because the Business Phone field is empty in some queue items.
use this vb expression
If TransactionItem IsNot Nothing AndAlso TransactionItem.SpecificContent.ContainsKey(“BusinessPhone”) Then
BusinessPhone = TransactionItem.SpecificContent(“BusinessPhone”).ToString
If String.IsNullOrWhiteSpace(BusinessPhone) Then
Log Message: “Business phone is missing.”
Else
Process the phone number
End If
Else
Log Message: “TransactionItem or BusinessPhone field is missing.”
End If