Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Converting returned ID in code to link

(0) ShareShare
ReportReport
Posted on by 65

Hello,

I have a info bar being generated that holds a value (ClaimId) that I would like to see returned as a hyperlink. Currently, the value is just being inserted into the info bar and being returned as a static value. 

public List frgetUsingClaimList()
{
    List                cl =   new List(Types::String);
    VMClmClaimHeader    clHe;
    VMClmClaimOperation clmOp, thisop;

    while select thisop where thisop.ClaimId == this.RecId
    {
        while select ClaimId from clHe
        // 4273
        where clHe.VINNumber == this.VINNumber && clHe.frPortalLock == NoYes::No
        join clmOp
            where clmOp.ClaimId     ==   clHe.RecId
            &&    clmOp.ClaimId     !=   thisop.ClaimId
            &&    clmOp.OperationId == thisop.OperationId
            &&    !clmOp.SubOperation
            &&    !thisop.SubOperation
        {
            cl.addEnd(strFmt("@VMS758",clHe.ClaimId,clmOp.authOperation().OperationId));
        }
    }

    return cl;
}

cl is the info bar list

clHe is where I'm grabbing all messages for the infobar related to the claim

clmOp is the current claim record instance that is being used to find the related claim messages. 

cl.addEnd is where I'm thinking I'd like to convert the value (clHe.ClaimId) to a hyperlink. I've seen mentioning of a URL extended data type and wondered if that was reusable for this particular code solution.

Also, a bridge I'll have to cross once I figure out if my question is even possible, strfmt might not take a hyperlink as it's input even though the hyperlink is just a string. I'm not sure if the system will recognize that once it's converted and passed.

  • Verified answer
    Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Converting returned ID in code to link

    I don't think that there is proper documentation, but you'll surely be able to find some blog post or so. Also, don't forget that you have the whole standard application available, therefore you can use cross-references to find out some real examples.

    I'm not sure what exactly you want to achieve, but at least try something like this:

    aRecordToFilterBy = ... find a record based on clHe.ClaimId ...
    
    SysInfoAction_FormRun infoAction = SysInfoAction_FormRun::newFormName(formStr(VMClmClaim));
    infoAction.parmCallerBuffer(aRecordToFilterBy);
    
    info("A message", '', infoAction));

  • JGjinx321 Profile Picture
    65 on at
    RE: Converting returned ID in code to link

    Do you have a link to the documentation around SysInfoAction???

  • JGjinx321 Profile Picture
    65 on at
    RE: Converting returned ID in code to link

    Yes, a windows application. Thanks for the response and help! The link should point to a claim within the windows application itself. It should take you to another form within AX specifically my VMClmclaim form. This form will show a list of claims all related to a specific VIN number. So I'll probably have to do a search on my table containing VIN's to find all related claims once this hyperlink is clicked.

  • Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Converting returned ID in code to link

    Where do you want to show it? If in AX 2012, a hyperlink as such isn't likely going to help you, because AX 2012 client is a Windows application, not a web application. I think you'll need an infolog action instead. It means creating an instance of a class inheriting from SysInfoAction, populating it with data (if applicable) and using it as the third argument of info().

    Or do you mean Enterprise Portal? That's a web application, therefore putting a hyperlink direcly to infolog might work. But you'd need to know how which URL to use. An infolog action may still be a better way.

    If you need a more specific answer, please tell us also what the link should point to.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,207 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans