Manipulating RecordID

Paluxo
Member Posts: 3
Hello!
Hi need to create several func to convert some navision data types into a text data type.
I'm creating a func RecordIDToText that converts a recordID into a text, but I can't manipulate a recordId in C/AL to create and test my func.
I'm need to know how make an attribution to a recordId and who to manipulate it.
Can u guys please help me.
Hi need to create several func to convert some navision data types into a text data type.
I'm creating a func RecordIDToText that converts a recordID into a text, but I can't manipulate a recordId in C/AL to create and test my func.
I'm need to know how make an attribution to a recordId and who to manipulate it.
Can u guys please help me.
0
Answers
-
Sorry, but I'm not quite sure what exactly you are trying to do?0
-
Use FORMAT to transform any datatype in NAV to a text representation.
I don't know what you mean by 'RecordID' though0 -
RecordID is property of RecordRef variable, which will return you the ID of the record, for example "SalesPrice: Item, XXXX,All Customers,,01.02.06,,,PCS,0". It means, that the record ID includes: "Table name: PK fields values". You can transform this RecordID into text in common way (using FORMAT).0
-
MTC wrote:Sorry, but I'm not quite sure what exactly you are trying to do?
I was triing to convert a RecordID (one of the navision data types) into a string. My problema was that i could not create a recordId with valid data to do the tests. Its necessary to use a RecordRef to get a recordId
Exemple:
Customer.RESET;
IF Customer.FIND('-') THEN BEGIN
RecRef.GETTABLE(Customer);
RecID := RecRef.RECORDID;
END;
My problem is SOLVED thanks guys0 -
Than please, add the [SOLVED] prefix into starting post subject...0
-
Paluxo wrote:MTC wrote:Sorry, but I'm not quite sure what exactly you are trying to do?
I was triing to convert a RecordID (one of the navision data types) into a string. My problema was that i could not create a recordId with valid data to do the tests. Its necessary to use a RecordRef to get a recordId
Exemple:
Customer.RESET;
IF Customer.FIND('-') THEN BEGIN
RecRef.GETTABLE(Customer);
RecID := RecRef.RECORDID;
END;
My problem is SOLVED thanks guys
Is the other way round possible?
I mean: when I have a recordID, how can I use this to get a record through a recordvariable (instead of a RecordRef)
is is as simple as the following code?RecRef.get(RecID); RecRef.SETTABLE(Customer);
And do I need a find statement right after the settable?
Tested it myself, and yes it is that simple and you don't need a find statement right after teh settable line.Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions