Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

HTML web Page Integration

Posted on by Microsoft Employee

Hi i am new to MSCRM and i got the following requirement and its urgent please help me with code.and steps.

1.Create a web page to get the following fields from user – id,  name, age, occupation, fullname 

integrate with crm and

2.Provide a button save. On clicking save it should find the id in CRM. If the id exists, then should update the values in corresponding CRM record

Else create with the entered values.

Regards.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML web Page Integration

    Hi

    You may want to consult Tenfold for HTML web Page Integration. Tenfold is a great CTI solution that offers integration over 150 more CRM and phone systems. It's easy to set up and will only take a few minutes. They also support MS Dynamics integration. You can check out their integrations list here www.tenfold.com/.../dynamics

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: HTML web Page Integration

    Hello,

    Here is article that describes functionality you mentioned - www.neudesic.com/.../crm-portal-technical-example

    Good luck

  • Suggested answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: HTML web Page Integration

    Hi Sai,

    Is this web page hosted inside CRM or is it a different website altogether?

    If it is a different website then you need to develop a SPA. Step can be followed from here:

    https://msdn.microsoft.com/en-us/library/mt595797.aspx

    CRM expose webAPI so you can simply do a GET on systemuser entity and it will provide you the result. Something like this:

    function retrieveSystemuser(error, token) {
        // Handle ADAL Errors.
        if (error || !token) {
            errorMessage.textContent = 'ADAL error occurred: ' + error;
            return;
        }
    
        var req = new XMLHttpRequest()
        req.open("GET", encodeURI(organizationURI + "/api/data/v8.0/systemusers?$select=domainname,fullname"), true);
        //Set Bearer token
        req.setRequestHeader("Authorization", "Bearer " + token);
        req.setRequestHeader("Accept", "application/json");
        req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        req.setRequestHeader("OData-MaxVersion", "4.0");
        req.setRequestHeader("OData-Version", "4.0");
        req.onreadystatechange = function () {
            if (this.readyState == 4 /* complete */) {
                req.onreadystatechange = null;
                if (this.status == 200) {
                    var accounts = JSON.parse(this.response).value;
                    renderAccounts(accounts);
                }
                else {
                    var error = JSON.parse(this.response).error;
                    console.log(error.message);
                    errorMessage.textContent = error.message;
                }
            }
        };
        req.send();
    }
    

    For the second requirement, you just need to check if the above query gave any output or not, if not then you need to do a POST message to create the record.

    However, please note the creating user in CRM is not simple. There are various mandatory field like business unit, domainname, primaryemailaddress etc that you need to provide. Also, user will be created as inactive because active user require licrense provisioning from Azure.

    Are you sure that the user record in 'systemuser' entity or are you referring to contact?

    Thanks,

    PS

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans