ContentArea Repeater field - RespCenterCode field - RespName
RecordUserSetup.RESET; RecordUserSetup.GET(USERID); IF RecordUserSetup."Sales Resp. Ctr. Filter" = '' THEN BEGIN RecordSession.SETRANGE("My Session",TRUE); IF RecordSession.FINDFIRST THEN BEGIN RecordUserSession.RESET; RecordUserSession.SETRANGE("Connection No.",RecordSession."Connection ID"); IF RecordUserSession.FINDFIRST THEN BEGIN RespCenterCode := RecordUserSession."Responsibility Center"; RespCenterCode.RESET; RespCenterCode.GET(RespCenterCode); RespName := RespCenterCode.Name; MESSAGE(FORMAT(RespCenterCode)); MESSAGE(FORMAT(RespName)); END; END; END ELSE BEGIN RespCenterCode.RESET; IF RespCenterCode.GET(RecordUserSetup."Sales Resp. Ctr. Filter") THEN BEGIN RespCenterCode := RespCenterCode.Code; RespName := RespCenterCode.Name; MESSAGE(FORMAT(RespCenterCode)); MESSAGE(FORMAT(RespName)); END; END;
Answers
If you have a sourcetable, be sure that it contains at least one record.
If you don't have it you can use "integer" as sourcetable, and filter it only for number = 1.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
The Source Table is "User and Session"
It works as expected... More or Less...
Have you checked is there any records in this table?
Regards,
Raveendran.BS
It works as expected... More or Less...
I must say sorry to you because when I said that there was a record in the sourcetable I was wrong :oops:!
In fact in codeunit 1 there was a personalization that deleted record in my sourcetable.
Since I can't delete this personalization Belias suggest me 2 solutions:
- use an integer sourcetable as you can read above
- use a temporary sourcetable, insert the value that I want to see in this temporary table and then show the 2 fields just inserted
Thx all for help!
It works as expected... More or Less...