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, ...
Suggested Answer

Create custom filtrable field with default dimension string value

(0) ShareShare
ReportReport
Posted on by 229

Hi all,

Is there a way to create a field for CustTrans form based on CustTrans.defaultdimension to display the string value of this one ?

This field must be filtrable so display method doesn’t work here and we can’t use defaultDimensionView because new standard method don’t work with it.

Thank you.

I have the same question (0)
  • Awaxx Profile Picture
    229 on at
    Need help please.
  • Raj Borad Profile Picture
    1,524 on at
    Hi User,
     
    You need to create a string field and push the value of dimension value in the insert method and update method of the CustTrans Table for upcoming transactions.
    For previous ones, you have to create a job to update that field with the value of dimension value.
     
    Thank you,
    Raj D Borad
  • Awaxx Profile Picture
    229 on at
    Hi Raj,

    Could you explain exactly what should i do please ?

    Thanks.
  • Awaxx Profile Picture
    229 on at
    Could i had those table to form datasource and join them to get display value ?


  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Yes your understanding is correct. You need to join them via formdatasource like you said or through a view as a datasource.
     
    First make sure what you actually want to show. Let's say some name using the default dimension recid. So for the existing records of customer transaction, go to ssms and check that value. Here you will get one query to fetch the name. Using the same query create a view as it may contain more than 1 table and add it as a datasource to the form. 
     
    This way you can achieve it.
     
     
     
     
  • Awaxx Profile Picture
    229 on at
    Problem as i said on the post i could not use views as datasource because of a deprecated method, before i was using defaultdimensionview as datasource but still 10.0.37 i can't.
     
    The new standard method :            
    custTrans_DS.positionToRecordByValue(fieldnum(CustTrans,RecId), int642Str(custTransOriginator.RecId));
    don't accept views as form datasource. 
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Are you facing some error when using view as a datasource? Can you send the error here?
     
    If you are not able to add a view then you can use tables as a datasource. Both does the same thing.
  • Awaxx Profile Picture
    229 on at
    Hi Bharani,

    Yes i've got an error saying : â€˜Unsupported data source used for PositionToRecord or PositionToRecordByValue. Unable to execute fallback logic to find record’.

    I was first using defaultDimensionView as datasource and used initialized event to get the value :
     
        FormRun formRun = sender.formRun();
        FormDataSource DefaultDimensionView_ds = formRun.dataSource(formDataSourceStr(CustOpenTrans, ));
    
        DefaultDimensionView_ds.queryBuildDataSource().addLink(fieldnum(CustTrans, DefaultDimension), fieldnum(DefaultDimensionView, defaultdimension));
    
        DefaultDimensionView_ds.queryBuildDataSource().addRange((fieldnum(DefaultDimensionView, Name))).value(sysquery::value(GLDimensionAttributeconstants::newDepartmentsDimension));
    And i used some property on this form datasource view to link CustTrans datasource.
     
    When i made some reasearch on the error, it appear that the new method i showed yesterday don't use views.
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    But can you tell us why you still need some custom code to populate values like you said this?
     
    used initialized event to get the value :
     
    Why do you require this initialised event? You can add a datasource normally with a linktype set right?
  • Awaxx Profile Picture
    229 on at
    Maybe i didn't understand how to this correctly.

    I think i was doing that to add the dimensionattribute filter value.

    Could you explain me how i could reach that step by step please ?

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