Forum Discussion

BobNelson's avatar
BobNelson
New Contributor III
7 hours ago
Solved

CustomSubstVars Warning Message

I am looking to upgrade from 7.1 to 8.  In the process of compiling dashboard extender rules, I get the following warning message.

Warning at line 50: 'Public Overloads ReadOnly Property TaskInfo As XFSelectionChangedTaskInfo' is obsolete: 'This is a temporary function used by Marketplace Solutions for backwards compatibility with old XF versions. Please change your code to use supported functionality. Use SelectionChangedTaskInfo instead.'. 

Question.  Is there an alternative syntax that will achieve the same result?  As best as I can decipher, the code in question (below) is to retrieve the value from the bound parameter LastActMonth_BDA into a new variable titled newLastActMth.

Dim newLastActMth As String = args.TaskInfo.CustomSubstVars("LastActMonth_BDA")

  • Bob,

    Somewhere in your code you're referencing your SelectionChangedTaskInfo using args.TaskInfo.
    Change args.TaskInfo to args.SelectionChangedTaskInfo and the error will go away.

    posted the important part because its impossible to post an image without this forum making it blurry.

3 Replies

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    Bob,

    Somewhere in your code you're referencing your SelectionChangedTaskInfo using args.TaskInfo.
    Change args.TaskInfo to args.SelectionChangedTaskInfo and the error will go away.

    posted the important part because its impossible to post an image without this forum making it blurry.

    • BobNelson's avatar
      BobNelson
      New Contributor III

      Thank you very much for your prompt reply.  Your solution worked.

  • rhankey's avatar
    rhankey
    Contributor III

    The line of code you show should not be generating the compile warning in an Dashboard Extender rules file.  Recompile the particular logic file and pay attention to the line of code it references having the issue.  the compiler tells you very clearly the line of code and function that is the issue.

    When moving to 8.0 or higher, a small but growing number of BRApi functions have been changed to require an additional pass-in parameter to specify the Workspace.  When you click on the function on the line of code that is actually generating the compile warning, you should see there is an additional variant of the BRApi function that allows you to pass-in the WorkspaceId.  Additionally, there just so happens to be a brand new 8.0 BRApi function that will return the WorkspaaceId.  As such, most of the compile warnings for deprecating functions can be resolved in minutes.  Even without fixing the deprecation function warnings, the code will *usually* continue to run without changes, so long as the Dashboard object you are after remains in the Default workspace, which buys you some time to resolve each warning.  But, depending on your specific code, who knows.  I think the functions that were depreciated in 8.0 are still supported in 9.0 - but don't quote me on that, as I resolved my codebase some time ago.  In any event, you clearly need to fix the functions in a timely manner, as they are not going to remain forever.  If/when you start using workspaces as they are intended, then you will need to pay a little more attention to the WorkspaceId you pass-in to these updated functions.

    There have been a couple other BRApi function that have been marked as going away pertaining to passing/storing of passwords.