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 :
Finance | Project Operations, Human Resources, ...
Answered

how the line properties are coming for the specific project

(0) ShareShare
ReportReport
Posted on by 167

Hi ,

In the standard anyone has the idea how the line properties are getting filtered for the specific project, which method the standard is using to get the line properties for the specific project.

I have a requirement in which I need to get the line properties for the projcode as table for the specific project, I am able to achieve the functionality by using execute query method in ProjLinePropertySetup Form but I am getting all the project lines.

Thanks!!

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    Hi D365 ER,

    Refer to the form ProjLinePropertySetUp method updateNow >> UpdateQuery >> projCodeRange - In this method they are adding range to all the fields.

    If you want to see the output of the range - Click on filter option on "Valid for" column on the ProjLinePropertySet form - You will be able to see all the ranges added from the code.

    Thanks,

    Girish S.

  • D365 ER Profile Picture
    167 on at

    Thanks Girish.

    But my requirement is to get the records whose  projcode is table only.

    How to achieve the same.

    Thanks!!

  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    Seems you have written code in the executeQuery method to add range to ProjCode field. On the same method try to call the clearRanges method of QueryBuildDataSource class and check.

    DataSourceName_ds.queryBuildDataSource().clearRanges();

    Thanks,

    Girish S.

  • D365 ER Profile Picture
    167 on at

    I tried using the clear ranges, but it is not working as I am calling the form from 2 different path.

    1. Project management and account-->setup-->line properties

    Here I have created the exact new form similar to line properties and write one extra execute query method so that I can get all the records of type table in projcode. This functionality I am able to achieve.

    2. The same form I am calling from all projects-->line properties(similar to old one).

    But here also I m getting the same result as from above form, but here I need records related to specific project.

    How can I achieve the second functionality.

  • GirishS Profile Picture
    27,833 Moderator on at

    So, in that case you need to add range to the ProjId and ProjCode based on the caller form.

    On your custom line properties from get the caller menu item - Based on the caller menu item you can add the range accordingly.

    If the form is called from Line Property form add only ProjCode as a range.

    If the form is called inside Proj table form add both ProjCode and ProjId as range.

    To get the caller menu item you can use "element.args.menuItemName()".

    Thanks,

    Girish S.

  • D365 ER Profile Picture
    167 on at

    Hi Girish ,

    Suppose I have 2 menu items A and B. Please let me know where I can write the following code to get the menu item name and add the range if I m calling from Proj table.

    Thanks!!

  • Verified answer
    GirishS Profile Picture
    27,833 Moderator on at

    If you are calling line property form from ProjTable then element.args().caller() will return ProjTable as menu item.

    Add your logic in the executeQuery method of line property DataSource.

    //declare buffer globally
    ProjTable projTable;
    //form init method - get the caller record.
    Public void init()
    {
        if(element.args().menuitemName() == menuItemDisplaystr(ProjTable) || 
            element.args().menuitemName() == menuItemDisplaystr(ProjProjectsListPage)
        {
           projTable = element.args().record(); 
        }
    }
    public void executeQuery()
    {
        if(element.args().menuitemName() == menuItemDisplaystr(ProjTable) || 
            element.args().menuitemName() == menuItemDisplaystr(ProjProjectsListPage)
        {
           /add ProjId and ProjRange.
           LineProperty_ds.queryBuildDatasource().addRange(fieldNum(LineProperty, ProjId)).value
           (queryValue(projTable.ProjId));
           //ad project code.
        }
        if(element.args().menuItemName() == menuItemDisplaystr(LinePropertyMenuItem)
        {
            //add only proj code as range.
        }
        super();
    }

    Thanks,

    Girish S.

  • D365 ER Profile Picture
    167 on at

    Got it....Thanks!!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 509 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans