Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Assignment is not allowed for this variable error

Posted on by 2,576

Hi all,

I have declared a DotNet type variable 'SignatureControlVariable' and selected the Assembly. For instantiating the variable, I wrote the following statement:

SignatureControlVariable := SignatureControlVariable.ClearSignature;

But it is giving me an error saying 'Assignment is not allowed for this variable'.

Kindly provide a solution.

Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Assignment is not allowed for this variable error

    Hi Tina,

    I am having exactly the same problem, and doing simply something like

    SignatureControlvariable.ClearSignature;

    (in my case, I am using VB .NET and have a Public Sub called Reset under class MyClass, so I do Myclass.Reset;) 

    doesn't work, because C/AL keeps complaining that the variable has not been instantiated. Have you discovered the issue?

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    Yogesh Kulkarni_ 1,762 on at
    RE: Assignment is not allowed for this variable error

    What is the assembly you are supplying to this variable?

    Try just clearing the signature like:

    SignatureControlVariable.ClearSignature;

     

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans