Code to put on Custom Modules created using "Replacing Cliente Module"

Hi,

I need to know what is the logic to know exactly what code we must introduce in a Custom Module created using "Replacing Cliente Module", in our case the only stuff we need to do is to change some LocalizableStrings.

We experience problems copying the full code of the parent Object, but doesn't works always, the article in https://academy.bpmonline.com/documents/technic-sdk/7-8/how-create-page-or-section-replacing-page isn't clear on this point.

We are working with bpmonline vs 7.6.0.938.

Thanks in advance

File attachments

Like

9 comments

Dear Julio,

 

Even though you need to alter only some of the localizable strings, you need to copy the full code to the replacing module. 

In case you face any difficulties, feel free to contact our support team at support@bpmonline.com and provide us with the custom code debugging, so we could assist with the specific issues.

Lisa

Thanks Lisa, the module I'm trying to do this is EmailItemSchema, but when I did it, all the content of the right panel related to email, dissapears, please indicate us if this is thje module I must to work on it, or another and what sourco code must we introduce,

Thanks in advance

Hi Julio,

If you choose the parent object, all the content should appear on the right panel as in the screenshot below:

Regards,

Lily

 

Thanks Lily, this is not my problem, the problem is when I save, refresh and run the app, all the mail content in the right panel dissapears.

Hi Julio,

Probably you copied the code from base EmailItemSchema (in UIv2 package). 

You need to copy the code from the schema based in the last package in hierarchy. Or better to leave only schema frame (see example below). 

If you still face difficulies, please contact support@bpmonline.com specifying instance and test credentials.

define("EmailItemSchema", ["BusinessRuleModule", "EmailConstants"], function(BusinessRuleModule, EmailConstants) {
    return {
        entitySchemaName: EmailConstants.entitySchemaName,
        methods: {},
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
        rules: { }
    };
});

Best regards,

Diana Adams

Thanks Diana, it works!

How we must determine/identify "the schema based in the last package in hierarchy"?

Thanks again!

Hi Julio,

The Diana meant the last matching schema from the last package in the package hierarchy. 

So, for example, if you have 2 'LeadPageV2' schemas in the 'Lead' and 'Custom' packages, copy the code from the one in 'Custom'.

Thanks Adam, then in our case if we are looking for wich code to put on the replacing module to EmailItemSchema, and looking for the packages / modules with this name I get only one: EmailItemSchema, inspecting the last package in the hierarchy (always shows the same?) I didn't saw any special in the hierarchy, I think it an static image, or not?, how can we interpret it?

In the case of EmailItemSchema, from where we get the code given by Diana?

Thanks in advance

Dear Julio,

As Diana mentioned in her comment, she provided the examplary schema frame. This is how just an empty shcema would look like.

Package Dependencies is not a static image. The same schema can exist in multiple packages. As you know, they are all being combined from top to bottom on the client's side. That's why you are overriding base methods in the Custom package, as it is loaded last. Diana advised you copying the code from the schema in the lowest package as the schemas in the core packages (top ones) contain a lot more code as the inheriting ones.

Show all comments