How do I add additional relationships to my Connected to options between accounts? I have gotten to the page- but I don't see how to add an additional relationship.

Like 0

Like

1 comments

Dear Heather,

 

To add a custom object to the connected to of the Account you would need to add corresponding record to the EntityConnection table in db with  SysEntitySchemaUid is a Uid of the Account and ColumnUId is a column uid that can be found in the SysEntitySchemaReference table. For implementing this please analyze the EntityConnection table and SysEntitySchemaReference  to have an understanding of which record you need to add. For example you can execute the following script: 

select SysSchema.Name, ColumnName, EntityConnection.* from EntityConnection inner join SysSchema on SysEntitySchemaUid = SysSchema.UId inner join SysEntitySchemaReference on EntityConnection.ColumnUId = SysEntitySchemaReference.ColumnUId

Best regards, 

Dennis 

Show all comments

Hi Community,

How can I add the current year, in case number mask in system settings

 

Like 0

Like

1 comments

Dear Fulgen, 

Unfortunately, you would not be able to put this value in the system setting manually and it is not recommended to change system setting dynamically. You can edit current year in the case number using business process. You can find more information about working with Date in business process here:

https://academy.bpmonline.com/documents/technic-bpms/7-13/formulas#XREF…

Best regards, 

Dennis 

Show all comments

I try to run the script task in a business process to create a printable. If the business process is started by user, it'll work just fine, but when the process is started by another process or an event it'll break with an exception:

System.NullReferenceException: Object reference not set to an instance of an object.

   at Terrasoft.Configuration.ReportService.ReportService.GetSchemaNameByTemplateId(Guid templateId)

   at Terrasoft.Configuration.ReportService.ReportService.GenerateMSWordReport(String urlTemplateId, String urlRecordUId, Boolean convertInPDF)

   at Terrasoft.Core.Process.ProcessInvoiceAutoSendCustom1Custom21Custom2MethodsWrapper.ScriptTask2Execute(ProcessExecutingContext context)

   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

The script task is like this:

var PrintableId = Get<string>("PrintableId2");
var ObjectIdInvoice = Get<string>("ObjectIdInvoice1");
var ConvertToPdf = Get<bool>("ConvertToPdf");
var AddInvoiceId = Get<Guid>("AddInvoiceId");
var AttachmentType = Get<Guid>("AttachmentType");
 
var userConnection = Get<UserConnection>("UserConnection");
 
var reportService = new Terrasoft.Configuration.ReportService.ReportService();
Terrasoft.Configuration.ReportService.ReportData report = reportService.GenerateMSWordReport(
    PrintableId, ObjectIdInvoice, ConvertToPdf);
var entity = userConnection.EntitySchemaManager.GetInstanceByName("InvoiceFile");
var fileEntity = entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("InvoiceId", AddInvoiceId);
fileEntity.SetColumnValue("TypeId", AttachmentType);
fileEntity.SetColumnValue("Name", "Invoice.pdf");
fileEntity.SetColumnValue("Data", report.Data);
fileEntity.Save();
return true;

I guess ReportService doesn't obtain UserConnection from Supervisor user, so it can't get instance of "InvoiceFile". Is that the case?

How to change the script to make ReportService work with Supervisor or maybe with UserConnection of another user?

Like 0

Like

3 comments

In a script task in an interpretive business process you need to get "user connection"  with the following syntax:

var userConnection = Get<UserConnection>("UserConnection");

Additionally, please note that if you want to work with process parameters in a script task, you need to write in the following manner:

var parameter1 = Get<Guid>("Parameter1");

Set("Parameter2", parameter1.ToString());

var parameter2 = Get<string>("Parameter2");



Also, from exception message it seems that desired template not exists in the system, so you should check it.

I have a similar requirement to send report automatically to users at a certain frequency. We use Creatio 7.18.5 and the report was built using the old ReportDesigner for 7.14 and was carried over to the new version when we upgraded. 

I tried to follow this article to create the report as part of our process - https://community.creatio.com/articles/generate-printable-and-send-it-attachment-email

When the process is manually run by the user, the report gets generated. But when scheduled to run by Supervisor using timer, it gives below error - 

Terrasoft.Core.InstanceActivationException: Error creating an instance of the "Terrasoft.Tools.DevExpressReport.IReportProvider" class ---&gt; Ninject.ActivationException: Error activating UserConnection using binding from UserConnection to method
Provider returned null.
Activation path:
  3) Injection of dependency UserConnection into parameter userConnection of constructor of type DevExpressConfReportLocalizationReader
  2) Injection of dependency IDevExpressReportLocalizationReader into parameter reportLocalizationReader of constructor of type ConfigurationDevExpressReportProvider
  1) Request for IReportProvider
 
Suggestions:
  1) Ensure that the provider handles creation requests properly.
 
   at Ninject.Activation.Context.ResolveInternal(Object scope)
   at Ninject.Activation.Context.Resolve()
   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)
   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
   at Ninject.Activation.Context.ResolveInternal(Object scope)
   at Ninject.Activation.Context.Resolve()
   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)
   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
   at Ninject.Activation.Context.ResolveInternal(Object scope)
   at Ninject.Activation.Context.Resolve()
   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)
   at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters)
   at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)
   --- End of inner exception stack trace ---
   at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)
   at Terrasoft.Configuration.DevExpressReportGenerator.Generate(UserConnection userConnection, ReportGeneratorConfiguration configuration)
   at Terrasoft.Core.Process.TAIAutoSendOrderLogSummaryMethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.ExecuteItem(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

Below is the report generation part of the code -  

//ReportService reportService = new ReportService(userConnection);
//ReportData report = reportService.GenerateDevExpressReport(entitySchemaUId,reportSchemaUId,null,reportParamaters);
 
DevExpressReportGenerator reportGenerator = new DevExpressReportGenerator();
var configuration = new ReportGeneratorConfiguration {
				ReportTemplateId = !string.IsNullOrEmpty(reportSchemaUId) ? new Guid(reportSchemaUId) : Guid.Empty,
				EntitySchemaUId = !string.IsNullOrEmpty(entitySchemaUId) ? new Guid(entitySchemaUId) : Guid.Empty,
				RecordId = !string.IsNullOrEmpty(recordId) ? new Guid(recordId) : Guid.Empty,
				ReportParameters = !string.IsNullOrEmpty(reportParameters)
					? JsonConvert.DeserializeObject&lt;Dictionary&lt;string, object&gt;&gt;(reportParameters)
					: null
			};
ReportData report = reportGenerator.Generate(userConnection, configuration);

I understand it's an old version of the report but I would appreciate if anyone can provide any insights on what I'm missing.

Hello Nirupama, Can you check if the run elements in the background is disabled ? If that is enabled, then the process will not get the User Connection.

Show all comments

Hello,

I imported an old version of an entity schema into my environment, replacing the current one, and then published/updated the database. It says there's no issue after publishing, but records cannot be saved now because the sql table still has columns from before the import that aren't recognized by the insert queries. 

I can revert to a repository, but I'm curious if there's a faster or known fix.

Like 0

Like

1 comments

Dear Jordan,

Unfortunately, there is no easier way to overcome the issue. Please revert changes to a repository. 

Regards,

Anastasia

Show all comments

I was wondering if anyone knows how to create routing behaviour based on an email reply. For example, routing the journey of a campaign in a different path or exiting the recipient from the campaign based on the fact that an email reply was received.

Any help, much appreciated.

 

Cheers,

 

Alex

Like 0

Like

2 comments

Dear Alex,

Campaigns are working based on responses got from provider on trigger emails, but reply to the email is another process. Simple reply cannot be tracked by the provider and it is tracked only by your mail-server. There is a possible way how can be it done as a workaroun: specify a button in the template that you are using in the campaign by clicking on which the recipient confirms that he will reply to this email. Then in campaign editor specify sequence flow condition which move the participant of the campaign to needed step based on the response received in trigger email (clicked) and specify the link name applying filter in condition flow as displayed on screenshots http://prntscr.com/mr3kt8 -> http://prntscr.com/mr3l24. You need to choose this link there. Or you can try setup filters on your mail-server side and track which email addresses replied to the email sent in the campaign. Then you can use this collection of records and using OData you can try finding those contacts in the application with this email and add them to particular static folder and get information on contacts that replyed to this email and use it in another campaign that will be continuing previous campaign.

Best regards,

Oscar

 

Oscar Dylan,

Thanks Oscar for the feedback. You would think the CRM was in a position to identify replied given email account is integrated. 

Show all comments

Hello, we want to force our portal users to create cases via email. So we want to remove the "New Case" button from their view in the Portal Cases Section.

We are on the cloud, if that makes a difference. How can we hide this button so it is not visible? Ideally, we would like to only hide it, and not delete it completely so if we ever want to use it in the future, it is easy to bring back into view. 

 

Like 0

Like

16 comments

Dear Mitch,

In order to remove the button form the portal section you need to indicate needed modifications in the diff section of the PortalCaseSection schema.

Please create a replacing client module for the PortalCaseSection and set "remove" operation for the SeparateModeAddRecordButton.

The code should look like this:

                {

                    "operation": "remove",

                    "name": "SeparateModeAddRecordButton"

                }

 

Regarads,

Anastasia

Anastasia Botezat,

Thank you.

What should I select as the Parent object? I assumed PortalCasesSection, however that is not an option.

Mitch Kaschub,

You should search by the schema title, but not name. PortalCaseSection is a name, but the title is:

Page schema - "Cases" section on Portal

 

Regards,

Anastasia

Hi Anastasia,

Thanks. I tried to create a new Replacing Client Module and selected Page schema - "Cases" section on Portal (Portal), however I get an error shown in the video. Is this because we already have a replacing client module in the custom package? Does that mean I should edit the Modifications Package in the module that's in the custom package? I tried that, but I am not sure if I put the code correctly. Can you review this video and advise what I am doing wrong?

http://recordit.co/8yXy9wJx7D

Anastasia Botezat,

Nevermind, I figured it out! I added the code to the already existing module in the custom package and it worked!

Anastasia Botezat,

I was able to successfully remove the green "New Case" button as I mentioned in my last comment. However, I've just now realized the main page on the portal has a link to "create a new case" as you can see here: 

http://recordit.co/Tyam8rVpmT

How can I remove that link? what is the schema I need to create a replacing module for? and what is the name of the item I need to use the remove operation for?

Mitch Kaschub,

The main portal page uses special modules, which you can setup. The module responsible for cases is called "UserCasesListModule". This is a basic functionality and you cannot override it, so to make link not clickable. 

In such situation you can do the following:

1. Set up access or operation rights the way, that portal users will not be allowed to create cases. 

2. Create your own module instead of the basic one. You can copy the logic of the basic module, but modify the part, where link is declared.

Regards,

Anastasia

Anastasia Botezat,

For option #2, would I create a "Replacing Client Module" and make UserCasesListModule the parent object? That doesn't seem to work, I get an warning message and then an error: http://recordit.co/4sWH5Rk1EV

Or instead, would I create a "Module" and copy paste the source code from the basic module? But then would I have to some how deactivate the basic module? or delete it?

Anastasia Botezat, Eugene Podkovka, 

I did find the code I need to modify here:

However I found I cannot create a replacing client module, system says it's not allowed. I understand I need to create a new module and copy the code. However I have not done this practice before, so hopefully you can help my resolve this more efficiently than having to read through the entire development guide. Are there any specific parts of a specific article that would directly apply to what I want to do?

Specifically what I'm looking for, is how do I make sure my new custom module gets used by the portal main page? Do I create the module like this in the Custom package: http://recordit.co/nsCkDWeohH ? Then how do I make sure the Portal main page loads from my new module instead of the original UserCasesListModule?

I am comfortable doing some trial in error since I am in my pre-prod environment since I can refresh the environment anytime if something goes wrong. 

Thanks for any advice!!!!

 

Mitch Kaschub,

There is no "fast" solution for that. Please investigate all development guide and create your own functionality that removes the button. Additionally, please deploy the application locally and investigate how other modules are connected to the system. Connect your one in the same way. Additionally, please learn how the Ext.js framework works (google it). You'll need it for the investigation.

You can't inherit a module because it was made via simple JS without bpm'online tools around it. That's why you see the inheritance in the code.

http://prntscr.com/n7rdpa

If you're not familiar with JS, MVVM framework and Ext.js, I recommend live the buttons on the pages and prevent creating cases with access rights. 

 

Eugene Podkovka,

Thank you Eugene. We have already changed portal user's access rights so they cannot create a new case. But still, the decision makers don't want the portal users to be able to see that button at all so I am continuing to look for a resolution. 

When you say, "deploy the application locally", are you referring to me installing bpm'online on premise? Currently our bpm online instance is hosted on the cloud. Does being on the cloud limit what I can all investigate and develop?

 

There are no limits, but on premise you can export c# and js modules and check how they work in the file system. Additionally, in the cloud you can't debug the code in the google chrome console. There are bundles there. On premise you'll see the modules separately in the google chrome developers tools. 

Anastasia Botezat, Eugene Podkovka,

What are the concerns with simply unlocking the Portal package and unlocking the UserCaseListModule schema and deleting this piece of code (shown below)?

I tried this in pre-production and was successful at removing the new button and everything else functions normally. 

I know it's not recommended to modify an out of the box package like this, why is that though? Will future upgrades not work correctly? Will bpm support stop supporting that package?

{

                                    "name": "dashboard-grid-createbutton",

                                    "classes": {

                                        "wrapClassName": ["default-widget-createbutton", config.style],

                                        "textClass": "dashboard-grid-createbutton"

                                    },

                                    "itemType": Terrasoft.ViewItemType.BUTTON,

                                    "caption": {

                                        "bindTo": "Resources.Strings.CreateButtonCaption"

                                    },

                                    "click": {

                                        "bindTo": "openAddCard"

                                    }

                                }

 

Mitch Kaschub,

The modified module will not be affected by the next upgrade. If bpm'online changes something in the schema in the next version then the functionality from the new release will not work and probably it will cause errors. 

Anastasia Botezat, Eugene Podkovka,

Thank you for the advice and recommendations. The solution I have decided to go with is to change the system setting "Portal Start Page" to [Portal Cases] instead of [Main Page]. Also in the system user section I changed the homepage for all of our individual portal users to [Portal Cases] instead of [Main Page]. Finally I removed Main Page from the portal workspace. Now when all of our current and future portal users log in to bpm, they go directly to the Portal Cases Section list page and they cannot navigate to Main Page where they would see the grid with the "New Case" buttons. 

I did not have to create a new module to replace the UserCasesListModule and I did not have to alter the original module. 

Thanks again for your suggestions.

Show all comments

I have an issue when I search for a Project in the Command Line.  The project is already converted over from an Opportunity.  I can use the filter/folder and Add a filter to locate the Project, but when I enter it into the Command Line, nothing is listed under the Search Results for Projects.  

This is only happening today so far with 5 new Projects that I converted.

Like 0

Like

1 comments

Hi Community,

Any Idea how can i do this, lets say in Current Case Edit Page, I want to know in client code if my previous screen before opening the Case edit Page is whether Case Section or Account Edit Page (referring to case section detail inside account edit page).

Thanks 

 

Like 0

Like

1 comments

See currentState from HistoryState

var state = sandbox.publish("GetHistoryState");

            var currentHash = state.hash;

            var currentState = state.state || {};                                           console.dir(currentState)

Show all comments

Hi Community,

How can I open an Edit Page in client code?

Like 0

Like

4 comments

Something like this

this.openCardInChain({
    schemaName: "UsrMyPage",
    operation: ConfigurationEnums.CardStateV2.EDIT,
    id: theIdToEdit,
    moduleId: this.sandbox.id + "_UsrMyPage"
});

You'll also need to add ConfigurationEnums to the modules list. This means you'll add ConifurationEnums to the module/page you're using this code above from:

define("UsrMyCurrentPageV2", ["ConfigurationEnums"],
	function(ConfigurationEnums) {
 
    //....
 
}

Ryan

Thank you Ryan, this is what i am looking.

Fulgen Ninofranco,

Hi,

 id: theIdToEdit,Here which id we have to mention in the code.

praveen n,

Supply the Id of the record.

Show all comments

Hi,

 I added a section filters  on status in Order screen. But When i click on status filter i can see the user name option along with the "select status"&"Clear" options. For what reason is the username visible in Status filters ? I have not given any such conditions there. Can you help me out to remove it.

The code snippet in OrderSectionV2 is given below

define("OrderSectionV2", [], function() {

    return {

        entitySchemaName: "Order",

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,

        methods: {

         initFixedFiltersConfig: function() {

                var fixedFilterConfig = {

                    entitySchema: this.entitySchema,

                    filters: [

                         {

                            name: "PeriodFilter",

                            caption: this.get("Resources.Strings.PeriodFilterCaption"),

                            dataValueType: this.Terrasoft.DataValueType.DATE,

                            startDate: {

                                columnName: "StartDate",

                                defValue: this.Terrasoft.startOfWeek(new Date())

                            },

                            dueDate: {

                                columnName: "StartDate",

                                defValue: this.Terrasoft.endOfWeek(new Date())

                            }

                        },

                        {

                            name: "Owner",

                            caption: this.get("Resources.Strings.OwnerFilterCaption"),

                            columnName: "Owner",

                            defValue: this.Terrasoft.SysValue.CURRENT_USER_CONTACT,

                            dataValueType: this.Terrasoft.DataValueType.LOOKUP,

                        },

                          

                        {

                            name: "Status",

                            columnName: "Status",

                            caption: this.get("Resources.Strings.StatusFilterCaption"),

                            appendCurrentOrderMenuItem: false,

                            dataValueType: this.Terrasoft.DataValueType.LOOKUP,

                            addNewFilterCaption: this.get("Resources.Strings.SelectStatusCaption"),

                            hint: this.get("Resources.Strings.SelectStatusCaption"),

                            buttonImageConfig: this.get("Resources.Images.SortIcon"),

                        }

                        

                    ]

                };

                this.set("FixedFilterConfig", fixedFilterConfig);

                

            }

        }

    };

});


 

 

Please find the below screen shot.

 

Like 0

Like

3 comments

Hello, the view that is responsible for generating menu items for fixed filter is called "FixedFilterViewV2" more precisely "getMenuButtonItems" method. We can see that appendCurrentContactMenuItem property is checking inside of this method. http://prntscr.com/mqtpy3



So the solution is to add this property to your filter config and set it to false.  I have already modified your code so please feel free to use it.

define("OrderSectionV2", ["BaseFiltersGenerateModule"], function(BaseFiltersGenerateModule) {
    return {
        entitySchemaName: "Order",
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
        methods: {
         initFixedFiltersConfig: function() {
                var fixedFilterConfig = {
                    entitySchema: this.entitySchema,
                    filters: [
                        {
                            name: "Owner",
                            caption: this.get("Resources.Strings.OwnerFilterCaption"),
                            columnName: "Owner",
                            defValue: this.Terrasoft.SysValue.CURRENT_USER_CONTACT,
                            dataValueType: this.Terrasoft.DataValueType.LOOKUP,
                        },
 
                        {
                            name: "Status",
                            columnName: "Status",
                            caption: "Status filter",
                            appendCurrentOrderMenuItem: false,
                            dataValueType: this.Terrasoft.DataValueType.LOOKUP,
                            addNewFilterCaption: "Status filter",
                            hint: "hint caption",
                            appendCurrentContactMenuItem: false,
                            buttonImageConfig: this.get("Resources.Images.SortIcon"),
                        }
 
                    ]
                };
                this.set("FixedFilterConfig", fixedFilterConfig);
 
            }
        }
    };
});

 

Hi Alex_tim,

Thank you. Worked.

Also I have an another question, I want to fix a value for lookup column like in owner filter we are using "defvalue" property. How can this property be used for status filter since this is lookup column.

Sriraksha KS,

You should take a look into "FixedFilterViewV2" and debug it to understand how the menuitems are added to the quick filter.

After debug, you will know how to add menuitems and if it will be necessary, simply override base logic.



Regards,

Alex

Show all comments