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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how get default dimension recid using its display value

(1) ShareShare
ReportReport
Posted on by 6
i have a default dimesnion named /Fund/ and its display value as /567/ , how to get the recid for this deafult dimension value , please help me
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    240,361 Most Valuable Professional on at
    If you mean in code, use DimensionAttributeValue::findByDimensionAttributeAndValue().RecId.
  • Sachin Mittal Profile Picture
    6 on at
      i used this dimensionAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValueNoError('Fund', '101', false, true); but giving error
    Type mismatch in 'DimensionAttributeValue.findByDimensionAttributeAndValueNoError' argument 1. The expected type is 'DimensionAttribute', but the actual type is 'str'.   
     
  • Martin Dráb Profile Picture
    240,361 Most Valuable Professional on at
    The value of the first parameter is wrong. You're passing a string, while the actual type is DimensionAttribute table. Use DimensionAttribute::findByName() to find the record.
  • Sachin Mittal Profile Picture
    6 on at
    can i validate this default fault dimension value using same code , i means if dimensionAttributeValue.recid exists , dimension value is correct otherwise it is wrong ?
     container                           dimCon = str2con("11030-101", "-");
            
            dimensionAttributenew       = DimensionAttribute::findByName('Fund');
            dimensionAttributeValue     = DimensionAttributeValue::findByDimensionAttributeAndValueNoError(dimensionAttributenew, conPeek(dimCon, 2), false, true);
    
           
    
          
            if (!dimensionAttributeValue.RecId)
            {
                throw error("Financial dimensions fund value is not correct.");
            }
     
  • Martin Dráb Profile Picture
    240,361 Most Valuable Professional on at
    It seems that the question how get default dimension recid using its display value has been answered, so please verify the answer.
     
    The query will tell you whether the such a value was already used as a financial dimension; that is hasn't been doesn't mean that it can't be. If you have more question on this other topic, please create a new thread for them.
  • Suggested answer
    Sachin Mittal Profile Picture
    6 on at
    i am updating one of your replies as suggest answer , but screen keeps loading after clicking on it

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
SajeedMullaji Profile Picture

SajeedMullaji 366

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 289 Super User 2026 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 260 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans