Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to ask for user selection and pass result from Xrm.Utility.lookupObjects to Custom workflow as an input parameter

Posted on by 507

I need to create an On demand workflow that runs on selected records in a view, that

1)initializes Xrm.Utility.lookupObjects so user can select a single lookup from a different entity

2)Passes this user selection as an input parameter to the workflow. 

3) The workflow simply adds this selection as an additional field for creation of similar records in another entity.

Really basically copying the selected records(less a few fields) and then adding the user selected field from a different entity to create new records in a different entity.

Any ideas appreciated. Its the user interface selection that has me stumped. Have researched combinations of actions, html, etc.. nothing coming together.

*This post is locked for comments

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to ask for user selection and pass result from Xrm.Utility.lookupObjects to Custom workflow as an input parameter

    Hi,

    There are few things in your requirement which is not possible.

    1) You can't execute JavaScript from a workflow.

    2) You can't pass entity collection (i.e. collection of records) as an input parameter to custom workflow.

    You could explore an option of Ribbon button, JavaScript, Custom Action & Plugin i.e. Ribbon button which calls you javascript, which then calls the lookupObjects  to load the record and then on selection, get the selected values and pass it as an imput parameter to the custom action and having a plugin registered on that custom action which accept the collection of records and then create required records.

    Some helpful links:

    www.inogic.com/.../show-lookup-dialog-in-dynamics-365-v9-0

    community.dynamics.com/.../execute-action-with-entitycollection-parameter-using-web-api-in-dynamics-365

    community.dynamics.com/.../how-to-set-entitycollection-output-parameters-in-custom-actions

    Hope this helps.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans