cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
klemetsrud
Frequent Visitor

Using CDS (Current Environment) - Reading from one dynamics 365 record and Creating another - Single Line of Text Field, with format of "Text Area"

Hello,

 

To put it very simply, i'm reading from a custom entity and creating an exact duplicate of that record in the same entity with "Copy of -" appended to the name.

 

This should be a simple things right, and it has been so far.

 

This is the first entity I have had to write to a field that is a Single Line of Text, formatted as "Text Area".

 

When I attempt to write it directly without doing any conversions or anything, I get:

The 'inputs.parameters' of workflow operation 'Create_location_details_on_newly_created_contract_inspection' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/new_unitnotes' is required to be of type 'String/byte'. The runtime value '"testing"' to be converted doesn't have the expected format 'String/byte'.

 

Again, I'm not performing any conversions here, but it's not having it.

 

For fun, I wrapped the item in a string function to see what would happen, and it made the error go away, but now when it writes to the field, it's converting it to some kind of base64 value or something automatically. It would take for example, if the field had "I like cheese" in it, and I convert to a string via: string(items('Apply_to_each')?['new_unitnotes']) - It writes it into the field like this:

 

WyJJIGxpa2UgY2hlZXNI=

 

This looks like it things the field is some kind of file attachment field or something. It's just a typical nvarchar like any other at the database level i'm sure.

 

I tried some other functions like decodeBase64 and Base64toString etc....I just can't seem to crack why this is happening. It seems like a bug to me, a rather big one if it cannot take its own source type to its own destination type where they are the exact same field.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mari
Community Support
Community Support

Hi @klemetsrud,

 

Unfortunately this is a known issue that has been reported to Microsoft. A behavior where Text Area format fields return data as base64 has been identified.

The fix deployment will arrive before the end of the month.

View solution in original post

5 REPLIES 5
Mira_Ghaly
Dual Super User II
Dual Super User II

Hi @klemetsrud 

Can you paste a screenshot please?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

 

@Mira_Ghaly - Thanks for your reply.

 

Here is the Field I'm reading from using CDS Current Environment, and it's also the exact same field I'm writing to.

 

01_IssueTextAreaFields_and_CDS_CE.jpg

 

Here is the step that reads a list of records, which includes that field

02_IssueTextAreaFields_and_CDS_CE.jpg

 

Here is the apply to each, that loops over that list, and creates exact duplicates (related to another record) of the source record. See field "Unit Notes"

 

03_IssueTextAreaFields_and_CDS_CE.jpg

 

Here is the error that is a result of that, as you can see "Unit Notes", at least on the surface appears correct "I like cheese" as a string, all good and dandy from a visual perspective.

04_IssueTextAreaFields_and_CDS_CE.jpg

HI @klemetsrud 

I know that the message says the issue in the Unit Notes, But i see another issue in setting the lookups, can you try to change them to /habc_contractinspections(UNIQUE ID) and try to remove Unit Notes and save and test-> Then add unit Notes and test

Mira_Ghaly_0-1592604125950.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Mari
Community Support
Community Support

Hi @klemetsrud,

 

Unfortunately this is a known issue that has been reported to Microsoft. A behavior where Text Area format fields return data as base64 has been identified.

The fix deployment will arrive before the end of the month.

klemetsrud
Frequent Visitor

@Mari - First things first, I would like to thank you tremendously for your response and acknowledgement of this issue, and the timeliness as to which it arrived. It seems like all to often this can not be the case with many products. Thank you again. I will wait to see when this has been resolved and will mark this as such when I can verify.

 

Thanks!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,216)