SBX - Search With Button

SBX - Forum Post Title

Custom Transformation Rules

Microsoft Dynamics NAV Forum

MateuszKILINSKI asked a question on 13 Mar 2018 2:52 AM
My Badges

Question Status

Verified

Hello. I would like to create new custom transformation rule. There is in system custom rule UNIXTIMESTAMP (CodeUnit 1225):

Documentation()

OnRun()

LOCAL [EventSubscriber] TransformUnixtimestampOnTransformation(TransformationCode : Code[20];InputText : Text;VAR OutputText : Text)
IF TransformationCode <> GetUnixTimestampCode THEN
  EXIT;
IF NOT TryConvert2BigInteger(InputText,OutputText) THEN
  OutputText := ''

LOCAL [EventSubscriber] InsertUnixtimestampOnCreateTransformationRules()
TransformationRule.InsertRec(
  GetUnixTimestampCode,UNIXTimeStampDescTxt,TransformationRule."Transformation Type"::Custom,0,0,'','');

LOCAL [TryFunction] TryConvert2BigInteger(InputText : Text;VAR OutputText : Text)
EVALUATE(TempBinteger,InputText);
OutputText := FORMAT(TypeHelper.EvaluateUnixTimestamp(TempBinteger));

GetUnixTimestampCode() : Code[20]
EXIT(UNIXTimeStampTxt);


Now, implementing above code, I would like to write own code to create ADDONEDAY Transformation Rule, which would add one day to specified date. I am new with NAV and developing it so I would like to start with add a simple record with new TransformationRule. I wrote this code (CodeUnit 99901):

Documentation()

OnRun()

LOCAL InsertAddOneDayToDateTransformationRules()
TransformationRule.InsertRec('ADDONEDAY', 'Add one day', TransformationRule."Transformation Type"::Custom, 0, 0, '', '');


I don't know how or where system should call above function to insert my Transformation Rule to the table. Is there any other place, where should I register own Transformation Rule?

Thanks for all answers! Good day for you all!

Reply
Verified Answer

They're used in Data Exchange management from NAV.

Start checking these links:

msdn.microsoft.com/.../dn495312(v=nav.90).aspx

msdn.microsoft.com/.../mt299581(v=nav.90).aspx

Reply
Verified Answer

They're used in Data Exchange management from NAV.

Start checking these links:

msdn.microsoft.com/.../dn495312(v=nav.90).aspx

msdn.microsoft.com/.../mt299581(v=nav.90).aspx

Reply

SBX - Two Col Forum

SBX - Migrated JS