web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Extend Custom Control method with COC

(0) ShareShare
ReportReport
Posted on by 743

Hello everyone,

I am trying to extend Formcontrol method with extension class but it's not working. By the way the control is custom control. And the coc is not hitting this point.

I am attaching code below if anyone have an idea i ll be glad to hear 

I am trying to work with PCRuntimeConfigurator Form object  this have a 

[Control("Custom")
class PCRuntimeControl and this control have a method named  public PCAttributeDetailsContract getAttributeDetails(int64 _recId)

Here is  my extension class header 

[ExtensionOf(formControlStr(PCRuntimeConfigurator,PCRuntimeControl))]
final class PRXPCRuntimeConfigurator_Extension
{

    public PCAttributeDetailsContract getAttributeDetails(int64 _recId)
    {
        EcoResCategoryAttribute  categoryAttribute;
        ImageReference imageReference;
        PCAttributeDetailsContract ret;
        EcoResProductImage ecoResProductImage;
        ret = next getAttributeDetails(_recId);

        categoryAttribute = EcoResCategoryAttribute::find(_recId);


        imageReference = ecoResProductImage::attributeImage(categoryAttribute,EcoResProductImageSize::Thumbnail);
        ret.parmImageType(imageReference.parmImageType());
        ret.parmImageData(imageReference.parmImageData());

        return ret;

    }

}

The code not hitting this extension class, when i was trying other formcontrol's  i am not facing this problem. I did not find any other method which i can extend it. 

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi partner,

    When will the getAttributeDetails() method be invoked?

    Please provide more details about it.

  • Suggested answer
    Muratvzr Profile Picture
    743 on at

    Dear All,

    I spent so many hours and I finally found solution about this. some how you can not apply coc extension on a custom control, so you have to duplicate resource on web page and javascript and add your new method to this items and, then you have to extend your Formcontrol base class and add your custom logic over there. 

    I hope this will be helpfull to anybody if anyone has a further question about this case can be contact me

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 302 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 183 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 120 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans