Is there an automated tool that adds to several Navision objects at once some code? For example, i want to add to 50 table objects a new function, then is there a program that takes input those 50 objects exported into txt-format, and adds my function to all of those objects by pressing one button? I believe i such program is possible to do, and perhaps is done maybe, but i didn't find in google anything.
0
Comments
Tino Ruijs
Microsoft Dynamics NAV specialist
But i don't want to copy-paste 50 times or more.
I understand. But I think copying 50 times is faster than searching for a tool which probably, if there is one, has disadvantages and limits.
But that's just my opinion.
Tino Ruijs
Microsoft Dynamics NAV specialist
RIS Plus, LLC
But what if i need in the future to do such rutine again? There will be 10 such situations again? Can you do time calculations for that too?
I think it should be an exeption to add the same function to 50 objects.
It's much better to have 1 function in 1 place and call it from 50 different places.
Tino Ruijs
Microsoft Dynamics NAV specialist
RIS Plus, LLC
I want to add such functionality that all matching (by name) fields is copied from any record to any record. For example:
Customer.CopyMatchingFieldsTo(Contact1);
Customer.CopyMatchingFieldsTo(Customer2);
Those 2 functions would copy Name field value from Customer variable to Contact1 and Customer2 variable's Name field. How to achieve this? Also the reverse functionality is needed:
Customer.CopyMatchingFieldsFrom(Contact1);
Customer.CopyMatchingFieldsFrom(Customer2);
This would copy matching fields from any record type to Customer record.
I thought to add to Customer and other tables such function:
"TransferFieldsToRecRef(VAR DestinationRecordRef : RecordRef)"
This function would copy all matching (by name) fields from current table(Rec) object to the parameter, what-ever the type of the parameter is.
The idea would be as:
Customer.CopyMatchingFieldsTo(Contact1Ref);
Contact1.CopyMatchingFieldsFrom(Contact1Ref);
This would copy from Customer record the matching fields to Contact1 record.
To achieve this i thought i should add those CopyTo and copyfrom functions to all tables so i can use them comfortably in the future for all tables. What do you think about this, maybe i have some bad strategy or something.
http://www.mibuso.com/dlinfo.asp?FileID=875
http://www.BiloBeauty.com
http://www.autismspeaks.org
CodeGenius helps programming in a little way only, it doesn't help with adding into lot of objects the same/similiar code/function as i understand.