Unable to use following Functions from codeunit workflow management in AL environment CU 1502 :
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:
- Read the FAQ
- 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.
- Use the latest Developer Preview release both the server part and the AL Language extension in VS Code (listed on the repository home page)
- 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
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?
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'
Which version are you on if you look into .alpackages folder at the Appliction.app symbol file?
i am working on 2018 CU2( 11.0.20348.0)
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
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 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.
done @Gallimathias .
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