AL icon indicating copy to clipboard operation
AL copied to clipboard

Unable to use following Functions from codeunit workflow management in AL environment CU 1502 :

Open shalu712 opened this issue 8 years ago • 9 comments

Unable to use following Functions from codeunit workflow management in AL environment CU 1502 : InsertDocApprovalWorkflowStep , also is there any replacement for dot NET variables as i am unable to use function Encode from CU 1502 only. Before logging a new issue please make sure to:

  1. Read the FAQ
  2. Search if there is an existing issue for what you want to log. If it's closed you can reopen it and add your comments.
  3. Use the latest Developer Preview release both the server part and the AL Language extension in VS Code (listed on the repository home page)
  4. If you're not using the latest released version (or are using a private build drop that is newer) please provide the version number in the issue

To help us reproduce the issue and find the root please try to: A) Attach a minimal set of AL code that causes the issue B) If the error occurs on the server - copy/paste the server stack trace from the Event Viewer

shalu712 avatar Feb 22 '18 11:02 shalu712

For .NET part of your question please read the FAQ to which you can see the link in your own post.

COD1502.InsertDocApprovalWorkflowStep is public and External already - why cannot you use it?

StanislawStempin avatar Feb 22 '18 11:02 StanislawStempin

while i am using getting this error: file: 'file:///c%3A/Users/shalini/Documents/AL/Recipe%20Configurator/COD37009721.RCWorkflowINE.al' severity: 'Error' message: 'The type or method 'InsertDocApprovalWorkflowSteps' cannot be used for 'Extension' development.' at: '68,22' source: 'AL' code: 'AL0296'

shalu712 avatar Feb 22 '18 12:02 shalu712

Which version are you on if you look into .alpackages folder at the Appliction.app symbol file?

StanislawStempin avatar Feb 22 '18 12:02 StanislawStempin

i am working on 2018 CU2( 11.0.20348.0)

shalu712 avatar Feb 22 '18 12:02 shalu712

For NAV 2018 you can just manually change that method to External since you have access to the base application. Afterwards regenaret application symbols as described here: https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-running-cside-and-al-side-by-side

StanislawStempin avatar Feb 23 '18 13:02 StanislawStempin

Method which i am calling is External only . I Found the reason why it is not allowing me run from Visual Studio code as somewhere in the method in Nav there is Dot NET variable used, which does not work in Vs code. can you please suggest which Class can be used to replace XmlNode.Attributes.ItemOf?

shalu712 avatar Feb 25 '18 18:02 shalu712

@shalu712 Could you please insert your issue into the description field and not use everything as title. It is better to have a meaningful short title and then describe it in detail.

Writing everything in the title is rude.

Gallimathias avatar Feb 26 '18 06:02 Gallimathias

done @Gallimathias .

shalu712 avatar Feb 26 '18 06:02 shalu712

As an alternative to ItemOf, use XmlAttributeCollection.Get :

var 
   attr : XmlAttribute;
begin
   if (attrCollection.Get('myattr', attr)) then
      // do something with attr.

Please see https://docs.microsoft.com/en-us/dynamics-nav/developer/api/xmlattributecollection-class for more information

atoader avatar Feb 26 '18 14:02 atoader