web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to get Dynamic Properties section attribute

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

I am working on Dynamics 365 for Sales and trying to get some attributes in Quote form to develop JS function, there is a Dynamics Properties section under product category, which is used to add product from price list, I need to know how many items are added in the list, I just use formContext.getAttribute("line").getValue() or formContext.getAttribute("quantity").getValue() , obviously, it doesn't work, how should I get this special section attributes, like quantiy, item line,1q thanks.

5025.jpg

 pastedimage1645234126252v1.png

I have the same question (0)
  • Verified answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    You will need to use Xrm.WebApi to retrieve those values. Highlighted section is subgrid which is showing the data from Quote Products child entity.

    var quoteId=formContext.data.entity.getId();

    quoteId=quoteId.replace('{','').replace('}','');

    Xrm.WebApi.online.retrieveMultipleRecords("quotedetail", "?$select=lineitemnumber,quantity&$filter=_quoteid_value eq "+quoteId+"").then(

       function success(results) {

           for (var i = 0; i < results.entities.length; i++) {

               var lineitemnumber = results.entities[i]["lineitemnumber"];

               var lineitemnumber_formatted = results.entities[i]["lineitemnumber@OData.Community.Display.V1.FormattedValue"];

               var quantity = results.entities[i]["quantity"];

               var quantity_formatted = results.entities[i]["quantity@OData.Community.Display.V1.FormattedValue"];

           }

       },

       function(error) {

           Xrm.Utility.alertDialog(error.message);

       }

    );

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Shawn99 Profile Picture
    5 on at

    Bipin, thanks a lot, the problem is solved.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans