Notifications
Announcements
No record found.
I need to validate the location and offset account.
When both are same and user try to change offset account on a form then it should through an error/message.
All right, so what do you need from us. You don't know how to write any validation at all, you don't know how to get the dimension value, or what?
I don't know how to get dimension value.
Than this is the question you should have asked. You can't build a wall if you don't have the bricks.
Do you understand the difference between default dimensions and ledger dimensions?
Let's start with default dimensions on journal name. You mean LedgerJournalName.DefaultDimension, right? You can use DimensionAttributeValueSetStorage class to work with it (look for examples either on internet or F&O codebase).
No need to use class but by using view(DimensionAttributeLevelValueAllView) I validated it easily.
//used validate write method on form
DEFAULTDIMENSIONVIEW ddv; DimensionAttributeLevelValueAllView dalvav; LedgerJournalName ledgerJournalName ;
SELECT DISPLAYVALUE FROM ddv join ledgerJournalName WHERE ddv.DefaultDimension == ledgerJournalName .DefaultDimension && ddv.NAME == 'my req location name' && ledgerJournalName .JournalName == ledgerJournalTable.JournalName;
select DISPLAYVALUE from dalvav where dalvav.VALUECOMBINATIONRECID == ledgerJournalTrans.OFFSETLEDGERDIMENSION && dalvav.ValueOrdinal == 2;
if(ddv.DisplayValue != dalvav.DisplayValue) {
isValid = checkFailed('Set correct offset account location');}
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 584 Most Valuable Professional
André Arnaud de Cal... 499 Super User 2025 Season 2
Sohaib Cheema 254 User Group Leader