AL icon indicating copy to clipboard operation
AL copied to clipboard

The type or method 'UpdateIntegrationRecords' ,'HandleGetPredefinedIdValue' and 'HandleUpdateReferencedIdFieldOnItem' cannot be used for 'Extension' development.

Open shadow747 opened this issue 8 years ago • 3 comments

Trying to develop a new api functionality and but updateintegrationrecords() function is used for populating the api from Graph Mgt - General Tools. Can this method be opened up for used in extensions.

Update : HandleUpdateReferencedIdFieldOnItem and HandleGetPredefinedIdValue functions in 'Graph Mgt - General Tools' codeunit are also required for api development and would require being external to work with extension.

Environment: Navision 2018 CU5.

shadow747 avatar Jun 21 '18 12:06 shadow747

Thanks for the feedback. We are planning to move the entire integration system to the platform so this system would not be necessary, thus we are reluctant to expose these for extension development.

I need to understand why and how would you use these functions? Is it possible for you to duplicate 'UpdateIntegrationRecords' method if you need it? Why would you call 'HandleGetPredefinedIdValue' and 'HandleUpdateReferencedIdFieldOnItem' manually?

nikolakukrika avatar Jun 28 '18 09:06 nikolakukrika

Creating API by using same ways as used by base navision objects like Graph Mgt - Currency, Graph Mgt - Payment Terms etc. For creating new master table Vehicle and setting up api for it.

example code snippet below :

UpdateIntegrationRecords(OnlyItemsWithoutId : Boolean) VehicleRecordRef.OPEN(DATABASE::Vehicle); GraphMgtGeneralTools.UpdateIntegrationRecords(VehicleRecordRef,DummyVehicle.FIELDNO(Id),OnlyItemsWithoutId);

LOCAL [EventSubscriber] HandleUpdateReferencedIdFieldOnItem(VAR RecRef : RecordRef;NewId : GUID;VAR Handled : Boolean) GraphMgtGeneralTools.HandleUpdateReferencedIdFieldOnItem(RecRef,NewId,Handled,DATABASE::Vehicle,DummyVehicle.FIELDNO(Id));

LOCAL [EventSubscriber] HandleGetPredefinedIdValue(VAR Id : GUID;VAR RecRef : RecordRef;VAR Handled : Boolean) GraphMgtGeneralTools.HandleGetPredefinedIdValue(Id,RecRef,Handled,DATABASE::Vehicle,DummyVehicle.FIELDNO(Id));

LOCAL [EventSubscriber] HandleApiSetup() UpdateIntegrationRecords(FALSE);

shadow747 avatar Jul 03 '18 14:07 shadow747

Thanks for the above details, we will add this request to our plan and get this addressed. unfortunately, I cannot commit to any timeline at this moment.

Thanks Anders

AndersLarsenMicrosoft avatar Aug 07 '18 08:08 AndersLarsenMicrosoft