/// <summary> /// /// </summary> /// <param name=/sender/></param> /// <param name=/e/></param> [FormControlEventHandler(formControlStr(ProdJournalTransBOM, PostJournal), FormControlEventType::Clicked)] public static void PostJournal_OnClicked(FormControl sender, FormControlEventArgs e) { ProdJournalBOM prodJournalBOM; FormControl formButtonControl = any2Object(sender) as FormControl; FormDataSource formDatasource = formButtonControl.formRun().dataSource(tableStr(ProdJournalTable)); ProdJournalTable prodJournalTable = formDatasource.cursor(); while select prodJournalBOM while select prodJournalBOM where prodJournalBOM.JournalId == prodJournalTable.JournalId && ProdJournalType::Picklist == prodJournalTable.JournalType { DimensionAttributeValueSetItemView dimensionAttributeValueSetItemView; DimensionAttribute dimensionAttribute; select dimensionAttributeValueSetItemView join dimensionAttribute where dimensionAttributeValueSetItemView.DimensionAttribute == dimensionAttribute.RecId && dimensionAttribute.Name == 'CostCenter' && dimensionAttributeValueSetItemView.DimensionAttributeValueSet == prodJournalBOM.DefaultDimension; if(dimensionAttributeValueSetItemView.DisplayValue == '000') { Error('CostCenter 000 dont alowed'); throw Exception::Error; } } } |
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156