So I need to essentially create a PowerApp which would make appointments in Dynamics CRM. All data gets sent to CRM - except the case regarding the appointment.
Originally, I was using the normal SubmitForm()
but switched over to the Patch()
function. I have set the _regardingobjectid_value
to a valid case GUID. The problem lies with _regardingobjectid_type
- as for some reason, I cannot set the entity name. In this case, the entity name would be "incident", but it keeps throwing an error that states that it needs another GUID. I really don't know what to do anymore.
This is the code I am using:
Patch(
Appointments;
Defaults(Appointments);
{
Subject: txtSubject.Text;
'Start Time': DateTimeValue(_selectedStartTime);
'End Time': DateTimeValue(_selectedEndTime);
Description:txtDescription.Text;
_regardingobjectid_value: _regarding;
_regardingobjectid_type: incident
}
)
So to clarify, I would just really like to have my appointment have the specified case regarded to it. At the moment I am getting an error stating that incident "name is invalid". If I remove the type, I get an ambigious error. And when I set the case id to the type, it does input my record into Dynamics, however with no case (understandably so).