Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

CRM Custom Field Multiple Lines of Text

Posted on by 1,695

CRM2016 on Premises

This is driving me nuts !

I have a custom workflow that adds lines to a multiple Lines of Text field. Im getting a strange issue with the spaces between text

BACS_HDR1record = "HDR1A" & _strOrigSUN & "S" & Space(2) & "1" & _BureauNumber & "12345600010001" & Space(7) & BACSSubMitDate & Space(1) & BACSMaxDate & "0000000" & Space(20)

If I export BACS_HDR1 to a text file I get 

HDR1A253461S  1B4010712345600010001       18165 182000000000                    * star to show end of line

In the multiple lines of text field I get the following

HDR1A253461S 1B4010712345600010001 18165 182000000000* star to show end of line

I have tried "      " instead of Space(?) but it makes no difference .

Does anyone know why CRM is supressing the spaces or what I can do to get the correct formatted string 

*This post is locked for comments

  • Pete_N Profile Picture
    Pete_N 1,695 on at
    RE: CRM Custom Field Multiple Lines of Text

    Dim BACS_FileString As String = String.Empty

    Dim BACS_HDR1record As String = String.Empty

    BACS_HDR1record = "HDR1A" & strOrigSUN & "S" & Space(2) & "1" & BureauNumber & "12345600010001" & Space(7) & BACSSubMitDate & Space(1) & BACSMaxDate & "0000000" & Space(20)

                       Dim UpdTranset As Entity = New Entity("new_transactionsets")

                       UpdTranset.Id = PostTransSetInserted.Attributes("new_transactionsetsid")

                       UpdTranset.Attributes.Add("new_apacs18file", BACS_FileString)

                       Upddateservice.Update(UpdTranset)

    I have checked the output for BACS_HDR1record to a text file and it has the correct number of spaces (space(?))  between the data and includes the space(20) at the end of the record, however when looking at the multiline field in new_transactionsets, their is only ever 1 space between data. and the space(20) is omitted.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: CRM Custom Field Multiple Lines of Text

    Hi PeteN,

    I have a couple of questions for you.

    • Are you adding extra spaces with your custom workflow?
    • How are you exporting the field to text file?

    It sounds like there is a problem with your custom workflow or your export process.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans