cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dexx3336 Helper I
Helper I

Not able to create the attachment regarding any entity

Hi All,

The code which was running earlier for creating the attachment in CRM from canvas app is not running now.

 

below is code snippet:

 

Patch(
Notes,
Defaults(Notes),
{
subject: TextInputTitle.Text,
notetext: TextInputDescription.Text,

_objectid_value : BrowseGallery1.Selected.accountid,
objecttypecode : "accounts",

filename: First(CameraImage).Filename,
documentbody: If(
StartsWith(
First(CameraImage).fileBody,
"data:image"
),
Replace(
First(CameraImage).fileBody,
1,
Len(
Left(
First(CameraImage).fileBody,
Find(
",",
First(CameraImage).fileBody
)
)
),
""
),
First(CameraImage).fileBody
)
}
)

What is wrong in above code? I also tried by using  "_objectid_type" instead of "objecttypecode" but didn't work for me. Smiley Sad 

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Not able to create the attachment regarding any entity

Hi @Dexx3336,

Please take a try to turn off/disable the "Use GUID data types instead of strings" option within Advanced settings of App settings of your app, then re-load your app, try your formula again, check if the issue is solved.4.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13
Community Support
Community Support

Re: Not able to create the attachment regarding any entity

Hi @Dexx3336,

Could you please share more details about the error message within your app?

Do you want to patch a new record within the Notes entity based on your Accounts record?

The user @chrisgreen has faced similar issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Ambiguous-binding-present-on-Patch/...

If the issue still exists, please consider take a try to submit an assisted support ticket throught the following link:

https://powerapps.microsoft.com/en-us/support/pro/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dexx3336 Helper I
Helper I

Re: Not able to create the attachment regarding any entity

Thanks, @v-xida-msft for a response. 
when I used _objectid_type I am getting below error:

Patch(
Notes,
Defaults(Notes),{
subject: TextInput1.Text,
_objectid_value: BrowseGallery1.Selected.accountid,
_objectid_type:"accounts"}
)

powerapp save image using patch to crm error.png

let me know if I am missing something in the above code?

And if I am right? then, don't know why the code is not working now Smiley Sad . I have already used the same code before and it worked at that time. But it is not working now.

suggestion/solution from anyone will be appreciated. I really need it this time as our client moved to D365 v9.1 online and it does not support off-line capability in the mobile app.

Thanks!

 

Dexx3336 Helper I
Helper I

Re: Not able to create the attachment regarding any entity

Is any work around solution for this?

Community Support
Community Support

Re: Not able to create the attachment regarding any entity

Hi @Dexx3336,

Please take a try to turn off/disable the "Use GUID data types instead of strings" option within Advanced settings of App settings of your app, then re-load your app, try your formula again, check if the issue is solved.4.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Dexx3336 Helper I
Helper I

Re: Not able to create the attachment regarding any entity

Hi @v-xida-msft , 
Yes, i also reached at that point in my finding and this was the only reason why it was not allowed to save the attachments in CRM.
I also noticed that before recent update this option was defaulted to false . But now it is set to true bydefault.

Thanks for your efforts. Smiley Happy

Microsoft
Microsoft

Re: Not able to create the attachment regarding any entity

Hi @Dexx3336 

 

I am also facing same issue while creating notes in D365, and as you suggested to turn off flag for "User Guid data types instead of strings", I do not find this option under App Settings. Any suggestions? I started getting this error as as soon as I enabled "Use Display Column Names" feature. Even I do not find this option to disable it back in App Settings.

finsg
Regular Visitor

Re: Not able to create the attachment regarding any entity

+1 I'm also facing this issue. And the "Use GUID data types instead of strings" option is missing in the Apps Setting. Has the option been moved @v-xida-msft ?

shine
New Member

Not able to create notes record in D365

I am also facing same issue while creating notes record in D365, and as you suggested to turn off flag for "User Guid data types instead of strings", this setting is not listed under App Settings. Is there any other option provided? Any suggestions? 

Microsoft
Microsoft

Re: Not able to create notes record in D365

Hi @shine 

 

Only option untill this issue/bug is fixed is to create a flow and pass note title, description, regarding value as parameters from PowerApp. That's what I did in my app.

 

Regards

Sachin Bansal

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (9,214)