Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Is there any way to modify the fields filled by a flow in a quick creation form?

Posted on by 10

Hello everyone, 

This is a picture of my lead business workflow: 

pastedimage1606930776352v4.png

I know it's in spanish but what I am doing is:

Fill the form of lead with contact information: 

pastedimage1606930603013v2.png

Then i save the lead and hit on the flow option of adding a new contact and displays the quick creation form for contacts: 

pastedimage1606930649153v3.png

But when it is displayed it doesn't automatically fill all the fields I filled previously.

So, the question is:

Is there any way to modifiy the fields filled automatically by the business workflow in the quick creation form of contact?

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Is there any way to modify the fields filled by a flow in a quick creation form?

    Hi ramirop,

    It is pre-defined system functionality: when opening Quick Create Contact form from Lead form, only some OOB fields will be automatically filled. Therefore, custom script is required if we want to populate other custom fields.

    For example, my Lead entity has a custom field "Custom lead field", and Contact has a corresponding field "Custom contact field", I want to fill the contact's field with the value of the lead.

    1. Open Lead main form, run the first function setValsForQuickCreate at OnLoad event of the form.

    It will create a global window property to store the value of lead.

    function setValsForQuickCreate(executionContext) {
        var formContext = executionContext.getFormContext();
        window.top.attribute1 = formContext.getAttribute("new_customleadfield").getValue();
    }

    0042.JPG

    pastedimage1606977921749v1.png

    2. Open Contact Quick Create form, also run the second function setValFromMainForm at OnLoad event of the form.

    It will fill the contact field with the stored value.

    function setValFromMainForm(executionContext) {
        var formContext = executionContext.getFormContext();
        if (typeof window.top.attribute1 !== 'undefined') {
            formContext.getAttribute("new_customcontactfield").setValue(window.top.attribute1);
        }
    }

    pastedimage1606978433599v2.png

    Result:

    As well as other OOB fields, the custom field will also get populated.

    6735.JPG

    Note: Function 1 and function 2 can be put into same JScript web resource.

    Regards,

    Clofly

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans