Unable to set the CreditAmount in JournalLineItem for journals created with Business Rule
I can't seem to figure out why the CreditAmount in the JournalLineItem isn't reflecting the number that I assign to it. It's always zero no matter what. Is anyone experiencing this issue? see my code below. Sub CreateJournal(ByVal si As SessionInfo) Try 'Set up a new journal header. Dim journalObjectHeader As New JournalHeader() With journalObjectHeader .Name = "Test_Journal" .Description = "This is a test journal" .WorkflowProfileID = si.WorkflowClusterPk.ProfileKey .MemberIds.Scenario = si.WorkflowClusterPk.ScenarioKey .MemberIds.Time = si.WorkflowClusterPk.TimeKey .JournalStatus = JournalStatus.Working .IsSingleEntity = False End With Dim journalObjectLineItems As New List(Of JournalLineItem) 'Create the first journal line item Dim jnLineItem1 As New JournalLineItem With jnLineItem1 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220030") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .DebitAmount.Amount = 150 End With journalObjectLineItems.Add(jnLineItem1) 'Create the 2nd journal line item Dim jnLineItem2 As New JournalLineItem With jnLineItem2 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220050") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .CreditAmount.Amount = - 150 End With journalObjectLineItems.Add(jnLineItem2) 'Create a new journal object Dim journalObject As New Journal(journalObjectHeader, journalObjectLineItems) 'Save it BRApi.Journals.Metadata.SaveJournalOrTemplateUsingIds(si, journalObject,False, True) Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Sub8Views0likes1CommentUse Data Adapter in a Different Workspace
I'm looking copy an existing data adapter (screenshot below) from the RCM solution into a different workspace and use it within BI Viewer for custom dashboards. I believe the 'GetReconsWithStatusGridView' function is stored within the 'Services' assembly folder and 'ReconService.cs' is the file within the folder that needs called. I have 'Is Shareable Workspace' set to True. Since the method query references WSMU, I need to update that in order to properly call the underlying business rule. That's the part I'm having trouble with. I've tried a wide variety of syntax to no avail. Examples: {Workspace.OFC.RCM}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services.ReconService}{GetReconsWithStatusGridView}{AccountFilter=...} Does anyone know the proper syntax to place in my copied data adapter? Are there any other steps I need to take to properly reference this business rule? Thanks!23Views0likes0CommentsFDX filter not working
I am trying to extract cube data using FdxExecuteDataUnit however, the filter does not seem to be filtering any data. Any ideas what the issue could be? I am seeing multiple flow members in the data table. Is there also a way to do all base members for a dimension? Dim dt As DataTable Dim cbName As String = "FinConsol" Dim ent As String = "E#124" Dim cons As String = "C#Local" Dim scen As String = "S#Actual" Dim time As String = "T#2025M1" Dim view As String = "V#YTD" Dim filter As String = "Origin='Import' AND Flow='EndBalInp' AND Account = 'NetInc' AND UD7 = 'GL_Load'" dt = BRApi.Import.Data.FdxExecuteDataUnit(si, cbName, ent, cons, ScenarioTypeId.Actual, scen, time, view, True, filter, 1, False)23Views0likes2CommentsCall Assembly Business Rule from another Workspace in a Data Management Step
I'm looking to call a business rule that is located in a different workspace within Assemblies but am unsuccessful. The first screenshot below shows my DM step configuration. The business rule I'm trying to call is an out-of-the-box rule within the Financial Close solution. The second screenshot shows the workspace (namespace prefix = OFC), the assembly (RCM) and the business rule (DiscoverRecons). The third screenshot shows the tool tip when you hover over "Business Rules" on the DM step. I've attempted many variations of the yellow highlighted syntax, always returning an invalid business rule error. The fourth screenshot shows the out-of-the-box DM step I'm emulating. I used this to verify the parameters I'm passing in work which they do. I've ensured that both the current workspace and OFC workspaces are sharable and include the shared workspace names. Does anyone know the correct syntax to call this rule into my DM step?99Views0likes7CommentsReturning a success or failure message from DM via REST API
Hi all, I'm triggering a DM job using the REST API. The job is running a business rule. I handle errors in the BR but I need to actually return the success or failure as a response to the postman request. Right now, I get a success message no matter what happens in the BR. Thanks in advance!14Views0likes1CommentIs there an example of using System.Reflection namespace with OneStream APIs
I'm driving myself a little crazy at the moment. Sometime in the last few days, I stumbled across a Community Post (I think) about how to use System.Reflection to programmatically list OneStream API object methods, overloads, parameters, etc. At the time I saw it, I thought "Oh, that's cool!" and remembered that if I needed to find it again, I just needed to search for "Reflection" in community posts. Well, for the life of me, I can't find the post again. Does anyone know of a post that describes how to use System.Reflection's methods, like GetMethods on OneStream API objects? I know I'm being lazy and could work out the code myself, but what I read had already worked out the BindingFlags and other parameters on the calls that were specific to OneStream.23Views0likes1CommentBusiness Rule to Remove Base-Level Entities from a Parent Rollup Based on Keyword Match
Hi everyone, I'm working on a Business Rule in OneStream and could use some guidance. I’m trying to build a rule that targets a user-defined parent rollup within the Entity Dimension. The goal is to automatically remove the relationship between that rollup and any base-level child entities whose name or description contains a specific keyword — in this case, "YS". Here’s what I’m aiming for: The rule should accept a parent rollup name (e.g., Global_excl_YS) It should loop through all children of that rollup If a child is a base member and its name or description includes "YS", the rule should "remove the relationship" Parent or intermediate rollups should remain untouched I’m planning to implement this as an Extensibility Business Rule, but I’d love to hear if anyone has done something similar or has tips on best practices for metadata manipulation in this context. Thanks in advance! ' Define dimension and parent rollup as parameters or hardcode here Dim EntityDimPK As DimPk = BRApi.Finance.Dim.GetDimPk(si, "MgmtEntity") Dim RollupName As String = "Global_excl_YS" Dim RollupMember As Member = BRApi.Finance.Members.GetMember(si, dimtype.Entity.Id, RollupName) ' Get all direct children of the rollup Dim Children As List(Of Member) = BRApi.Finance.Members.GetChildren(si, EntityDimPK, RollupMember.MemberId, Nothing) Dim RemovedEntities As New List(Of String) For Each ChildMember As Member In Children Dim ChildName As String = ChildMember.Name Dim ChildDesc As String = If(ChildMember.Description, "") ' Check if base (no children) Dim HasChildren As Boolean = BRApi.Finance.Members.HasChildren(si, EntityDimPK, ChildMember.MemberId, Nothing) If Not HasChildren Then ' Check if "YS" in name or description If ChildName.ToUpper().Contains("YS") Or ChildDesc.ToUpper().Contains("YS") Then ' Remove Relationship End If End If Next If RemovedEntities.Count = 0 Then Return "No base children with 'YS' found under " & RollupName Else Return "Removed from " & RollupName & ": " & String.Join(", ", RemovedEntities) End If23Views0likes1CommentProcess Cube automation
We have a business rule that, after loading data, runs a Process Cube. When using this with the batch harvest API, it behaves pretty much as expected in that, after the process is complete, it returns a status and execution time and all that. However, I have grown to dislike the file clutter that results from years and years of harvest file processing and I'm updating the code to use the BRApi.DataQuality.Process functions. Both ExecuteProcessCube and StartProcessCube can be used for this with the main difference being the objects needed to kick them off and the object types they return: Start returns a TaskActivityItem and Execute returns ProcessCubeProcessInfo. Superficially, I could walk away from this effort right now and it would work but I've noticed one really annoying issue: neither returns a real status of the process itself. This appears to be because our Process also runs a Calc. Both Start and Process "succeed" nigh-instantly while the Calc continues to run for five more minutes. I'd rather prefer to wait, monitor the calc, and only send the notification of the full load/calc being complete when it's... actually complete, you know, the way it already works with the harvest automation method. So, am I using these tools incorrectly? Have I missed an obvious feature? The fact that they both seem to have effectively the same behavior actually makes me think one of them should behave differently than the other by stopping, waiting, and observing before returning a status and its failure to do so is a bug. Could I perhaps use one of these returned objects to sniff out the calc and monitor it manually?63Views0likes8CommentsHow to call a workspace assembly service from another workspace assembly service ?
Dear community, One of my use case is to create a function that I would commonly use in any other workspace. I haven't seen a community message about it, and the documentations does not specify how to do so, so here's the use case : I have a Workspace A (name: WorkspaceA), with an assembly named WA_Assembly, and in it are my services & functions that I want to reference and use. I have a Workspace B, where I need to call the functions from Workspace A. SOLUTION : Create a new dependency in Workspace B : Dependency Type : "Workspace Assembly" Shared Workspace Name : WorkspaceA Dependency Name : WA_Assembly Then, in a given Workspace B service, use Imports Workspace.WorkspaceA.WA_Assembly (vb.net) or using Workspace.WorkspaceA.WA_Assembly (C#) for referencing the Shared Public Functions. Then you will be able to use these functions in another workspace ! Just adding this message for future references :)41Views2likes1Comment