Difference between record open modes

I have a function in the Quote page that overrides generatePrintForm() from PrintReportUtilities (to automatically save the record prior to printing).  The overridden function only fires under certain circumstances; I've used console logging to confirm that it isn't called at all in others.  As best I can tell, this matches up to the difference between this mode (green button), when the record is opened from a link in another record or the page is refreshed after being opened from the section list:

And this mode (blue button), when the record is opened directly from the section list and not refreshed:

In the first mode, the function is called properly upon attempting to print; in the second, it isn't called at all.  What exactly is the difference between these two modes, and is there a way to tell from the backend?  (Or alternately, any way to ensure the record is always opened in the first mode?)

Like 0

Like

2 comments

Dear Darian,

You are correct regarding two different modes. There are two modes for the card: combined mode (blue save button) and add new record mode (green button save).

The main and most noticeable difference is top panel, where buttons and actions are. When you open a record from section, the page is working withing combined more, which means, that all buttons and actions are taken from section schema. Such mode enables you to unfold left panel and browse through other records from the section. 

If you follow a direct link to a record from other section, or refresh the page (F5) the record with be opened via add new record mode. This follows, that buttons and actions will be taken from the page schema.

Based on your description, I can suppose, that you have added overriden generatePrintForm() function to the page schema (lets say ContactPageV2). Therefore, the functionality works when opening direct link to the record, or page refresh.

In order for the functionality to work in combined mode, please add the logic to the section schema as well (e.g. ContactSectionV2).

Please see this article on adding button to the combined mode. You will find more information on functionality realization:

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-button-edit-page-combined-mode

Regards,

Anastasia

Anastasia Botezat,

Very helpful information, thank you.

Show all comments