cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaelSeanGuez
Advocate I
Advocate I

Adding a Task to Project Tasks in Dataverse

I work in custom fab and production.  I am currently working on a suite of Project Management apps to help us track and schedule projects facilities on 2 coasts.  I am keenly interested in trying to use Project for the Web to perform this task, BUT, I'm having an issue.  We're dealing with a fairly complex assembly tree on any given project.  What I want to do is create that tree in design software and then export it to Project for the Web.  I have created a flow in Power Automate that creates and names a new Project, but I cannot seem to add a new row to the Project Tasks table.  This is the message I get:

 

"We’re sorry. You cannot directly do 'Create' operation to 'msdyn_projecttask'. Try editing it through the Resource editing UI via Project."

 

Does anyone know a way around this?  

 

 

11 REPLIES 11
MichaelSeanGuez
Advocate I
Advocate I

Posting a reply to my own issue.  

 

Still working on this problem.  Microsoft has some published material about using an API to create a new Project and add tasks.  I had to correct a few syntax errors in the instructions, but everything works except for the adding tasks part: Use Project schedule APIs with Power Automate | Microsoft Docs

 

I am very much a "citizen coder".  I have been working with the Power Platform for about a year.  While there is a lot to know, I have been learning quickly and usually I know enough to implement something like this.  The issue I seem to be stuck on is "msdyn linkstatus".  This walk through just suggests putting a number there, but I cannot seem to put an acceptable value.  I get the following error:

 

An error occurred while validating input parameters: Microsoft.Crm.CrmException: Invalid property 'msdyn_linkstatus' was found in entity 'Microsoft.Dynamics.CRM.msdyn_projecttask'. ---> Microsoft.OData.ODataException: Does not support untyped value in non-open type.
at System.Web.OData.Formatter.Deserialization.DeserializationHelpers.ApplyProperty(ODataProperty property, IEdmStructuredTypeReference resourceType, Object resource, ODataDeserializerProvider deserializerProvider, ODataDeserializerContext readContext)
at Microsoft.Crm.Extensibility.CrmODataEntityDeserializer.ApplyStructuralProperty(Object resource, ODataProperty structuralProperty, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.CrmODataEntityDeserializer.ApplyStructuralProperty(Object resource, ODataProperty structuralProperty, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.ApplyStructuralProperties(Object resource, ODataResourceWrapper resourceWrapper, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
at Microsoft.Crm.Extensibility.CrmODataEntityDeserializer.ApplyStructuralProperties(Object resource, ODataResourceWrapper resourceWrapper, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.ReadResource(ODataResourceWrapper resourceWrapper, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.ReadResource(ODataResourceWrapper resourceWrapper, IEdmStructuredTypeReference structuredType, ODataDeserializerContext readContext)
at Microsoft.Crm.Extensibility.ODataV4.CrmODataActionPayloadDeserializer.ReadEntry(ODataDeserializerContext readContext, ODataParameterReader reader, IEdmOperationParameter parameter)
at Microsoft.Crm.Extensibility.ODataV4.CrmODataActionPayloadDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)

 

The keywords here seem to be "Invalid Property" and/or "Microsoft.OData.ODataException: Does not support untyped value in non-open type"

 

WTF is a link status?  Excepting 2 fields (which refer to other tables in the data set), all the other references in the code refer to fields that are on the Project Tasks table.  This one is not.  So where is it?  What is this value?  I found two references online and both of them simply enter a number value here.  I can't tell from this error message if the field is wrong or the value is wrong.  

 

I would be terribly grateful to anyone who could get me over this hump.  

 

 

MichaelSeanGuez
Advocate I
Advocate I

I found this in a somewhat unrelated document, but it seems to explain the static number values.  "192350000" is the value I was asked to enter in this "link status" field.  I found a second board that used "192350001" in relation to a similar issue:

 

MichaelSeanGuez_0-1652615527208.png

 

So, the million dollar question is: how do I input this value so that msdyn will accept the value?

MichaelSeanGuez
Advocate I
Advocate I

Alright,

 

A little more research led me to another table using the same numeric values for a different options set, which tells me those numeric codes are standard keys of some kind that can be used in multiple situations.  Reviewing this material: Use Project schedule APIs to perform operations with Scheduling entities | Microsoft Docs

 

Lead me to this: 

 

MichaelSeanGuez_0-1652616272779.png

 

This is a list of restricted fields, meaning you can't write a value here.  That is likely what the convoluted error message was telling me.  So ... I cut it out.  I got rid of the entire link status reference.  And ...

 

It worked!!!!!

 

That being said, this original walk-thru has a few errors in it.  I will post an update to this thread later today. 

 

This is possible though. You can write a value to the Project Task table using the Unbound Action operation.  I have a working flow that created a named project and inserted at least one task into a custom bucket.  It took me three days to sort through it all, but it worked.

 

 

 

 

 

ntungala
New Member

Hi Michael, 

Could you please share the solution you used to solve this issue?  

Could you provide the steps for your solution? I'm running into this same issue.

Hoping to see more of how you got this to work.
It's a wonder that there isn't a proper built-in way to do this in Power Automate yet.

Yeah, I have not find the workaround either. I am using posting into Project Online instead of Project for the web. But I think it will become a better and steamlined way to manage projects in the future. I would very much like to know if this was solved.

If I find something I will let you know.

MichaelSeanGuez
Advocate I
Advocate I

Sorry everyone.  I've been slammed at work and I have not had any time to follow up on this thread.  I wish I could say that was going to change.  If I can find some time, I'll try to post the automation this week.  

 

-Michael

Thanks Michael. Much appreciated.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,286)