Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)
Under review by Community Managers

Under review

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

Cannot link Order Product to Order (Javascript) getAttribute

Posted on by 32
Hi Everyone
I want find the order product (orderdetail) linke salesorderid and productid. see below
 
I can show order lookup . However below code does not show salesorderid or productid (need the onscreen value of product id rather than database)
    var formContext = executionContext.getFormContext();
 
    var productid = formContext.getAttribute("productid").getValue();
    var baseamount = formContext.getAttribute("baseamount").getValue();
 
    if (baseamount) {
        alert("Base amount: " + baseamount);//works
    }
 
    if (productid) {
        alert("Product ID: " + productid);//not wrking
    }
 
    if (salesOrderId) {
        alert("Sales Order ID: " + salesOrderId);//not working
    }

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