Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

How to convert Entity Image Byte Data to Base 64 Workflow MSCRM

Posted on by 45

Hi All Virtual ,

I am facing some problem with my code can someone help me.

pastedimage1642272674407v1.png

referring this blog:https://www.xrmlabs.com/About-Us/XRMs-Blog/Post/7215/How-to-convert-Entity-Image-Byte-Data-to-Base-64-Workflow-MSCRM

Thanks

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,958 Super User on at
    RE: How to convert Entity Image Byte Data to Base 64 Workflow MSCRM

    Hello,

    Make sure you decorate your input parameters with correct attributes as per below code -

           [RequiredArgument]

           [Input("ImageFieldSchemaName")]

           public InArgument<string> ImageFieldSchemaName { get; set; }

           [RequiredArgument]

           [Input("Base64dataField")]

           public InArgument<string> Base64dataField { get; set; }

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,958 Super User on at
    RE: How to convert Entity Image Byte Data to Base 64 Workflow MSCRM

    Hello,

    You need to update your line of code with below code -

    Entity PreImage = workflowContext.PreEntityImages.First().Value;

    Also, update below code

    ent = base64;

    with

    ent[Base64dataField.Get<string>(context)] = base64;

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans