Tuesday, November 16, 2021

Add symbol icons to the Grid in Dynamics 365FO

 

    We see how to add symbol icons to the grid in Dynamics 365FO. I have to add icons to the records based on qty. 


For this, 

1. I have created a display method on my table    

    [SysClientCacheDataMethod(true)]
    public display container logo()
    {
        ImageReference          imageReference;
        container               image;
        
        
        //imageReference = ImageReference::constructForSymbol(
				this.QtyAvailable mod 2 ? 'GreenCheck' : 'RedX');
				
        str name = this.QtyAvailable mod 2 ? 'GreenCheck' : (
				this.QtyAvailable mod 3 ? 'YellowTriangle': 'RedX');
        imageReference = ImageReference::constructForSymbol(name);

        if (imageReference)
        {
            image = imageReference.pack();
        }

        return image;
    }

2. Created new Form image control in the form grid and set up the properties for that control.





Symbols:
  • GreenCheck
  • YellowTriangle
  • RedX
  • GreenCircle
  • RedDiamond
  • BlueSquare
  • RedSquare
  • GreenSquare
  • OrangeSquare
  • GreenSquare
  • YellowSquare
  • TemporaryUser
  • EditEvent
  • YellowExclamationPoint
We can use the above symbols as per our requirements.

Reference: https://www.avantiico.com/adding-symbol-font-icons-to-a-grid-in-dynamics-365-for-finance-and-operations-enterprise-edition/

Keep Daxing!!

No comments:

Post a Comment