05-16-2023 03:56 AM
Hi Experts,
I am trying to read the member ID in data buffer to assign some values accordingly, But it is giving in correct ID seems
in the log file i can see ID as "-1" , Generally Member ID was different in the dimension library if this is readying correctly - Kindly confirm
Dim vSrcUD2Split As String() = Split(sText2,":")
Dim GetUD1Ac As String = Trim(vSrcUD2Split(0)):Dim GetUD1Mvt As String = Trim(vSrcUD2Split(1))
Dim vTgtActID As Integer = api.Members.GetMember(DimType.Account.Id,GetUD1Ac).MemberPk.MemberID
api.LogMessage(vTgtActID)
Outcome is : -1
Solved! Go to Solution.
05-16-2023 05:01 AM
I think the problem is that you have added .MemberPk. This works for me:
api.Members.GetMember(DimType.Account.Id, "HEADCOUNT").MemberId
05-16-2023 05:27 AM - edited 05-16-2023 05:29 AM
Hi BCG
Markus is right, your MemberPk is false, you can access the MemberId directly from the Member object.
But if you don't need the object, you can even access the id directly by using the following:
api.Members.GetMemberId(DimType.Account.Id, "HEADCOUNT")
Cheers
Christian
05-16-2023 04:44 AM
Hi, what is the member name when you log "GetUD1Ac"? Does that match 100% with the member of which you intend to retrieve the ID? It seems likely that the string returned to GetUD1Ac may be a little inaccurate and therefor cannot be found in the dimension.
05-16-2023 04:53 AM
yes account GetUD1Ac value is correct. matching with log file
05-16-2023 05:01 AM
I think the problem is that you have added .MemberPk. This works for me:
api.Members.GetMember(DimType.Account.Id, "HEADCOUNT").MemberId
05-16-2023 05:27 AM - edited 05-16-2023 05:29 AM
Hi BCG
Markus is right, your MemberPk is false, you can access the MemberId directly from the Member object.
But if you don't need the object, you can even access the id directly by using the following:
api.Members.GetMemberId(DimType.Account.Id, "HEADCOUNT")
Cheers
Christian