I am looking for a solution to create a record within Dataverse from a typescript app and all the information regarding authorisation etc.
I have found a nom package https://www.npmjs.com/package/dynamics-web-api
I need to know will this do the job and if so - any more information on the subject or has anyone done it ?
I am using but I am getting an error with this piece of code :
try{
//call any function
const responseDyn = async () => {
await dynamicsWebApi.executeUnboundFunction('WhoAmI');
}
console.log(`Hello Dynamics 365! My id is: ${responseDyn.UserId}`);
}
catch (error){
console.log(error);
it is saying UserId does not exist on type Promise(void) - how does it know because it hasn't got the json yet so to speak.