Hello community!

I need get in a bussines process a collection parameter and then use that in a script task into a foreach. Any example about that?

 

Regards,

 

Like 0

Like

5 comments

Dear Federico,

Please check the instructions on how to work with collections within [Read data element]. This will help you to implement your own process.



Algorithm of the work with a collection from Read data:



1.Disable the formula validator in business process designer. You can open the console and execute the following script for that:

var featureCode = "UseProcessFormulaServerValidation";

require(["FeatureServiceRequest"], function() {

                var featureRequest = Ext.create("Terrasoft.FeatureServiceRequest", {code: featureCode});

                featureRequest.updateFeatureState({

                               forAllUsers: true,

                               state: Terrasoft.FeatureState.DISABLED // ENABLED

                }, ()=>console.log("Done"));

});

 

2. In [Read data] element go to extended options and tick:

Read first = true

Number of records to read = 100 //Number of records available in a collection.



3. Create a process parameter with EntityCollection type and map it to the resulting collection of [Read data]. This parameter does not exist out of the box, but you can create it manually. 

Example:

[#MyRead.Resulting collection#]

*  MyRead – [Read data] element header.

* Resulting Collection - added manually

 

4. Assign a process parameter to a new variable in ScriptTask. Here is the example how to process the collection:

EntityCollection entities = Get("MyEntity");

var result = new Collection();

foreach(Entity entity in entities) {

                var cityName = entity.GetTypedColumnValue("Id");

                string temp = cityName.ToString();

                result.Add(temp);

                }

 

string displayValue = result.ConcatIfNotEmpty(",");

Set("MyResult", displayValue);

return true;

 

MyRead – reading datat in any element.

MyEntity process parameter with EntityCollection type. Parameter value= [#MyRead.Resulting collection#]

MyResult - string parameter. You can store record IDs from the collection. Then this parameter is shown on the auto generated page for the testing purposes.  

Best regards,

Lily

Lily Johnson,

Hello,

I tried the above script task as below:

EntityCollection entities = Get("MyEntity");

var result = new Collection();

foreach(Entity entity in entities) {

                var productName = entity.GetTypedColumnValue("Name");

                string temp = productName.ToString();

                result.Add(temp);

                }

string displayValue = result.ConcatIfNotEmpty(",");

Set("UsrLatestOrderProduct", displayValue);

return true;

 

But, here I'm getting below errors:

 

Lily Johnson,

Hello,

 

Can you elaborate on how Auto-Generated Page works upon this case? 

 

Many Thanks

Riddhi Jadeja,



As we can see from the screenshots you have provided - GetTypedColumnValue is used incorrectly. 

GetTypedColumnValue("Name") is used without specified type of this field. 

It should be GetTypedColumnValue<string>("Name")



Kind regards,

Roman

Sarthak Jain,



Can you please specify your question with more details? 

How exactly Auto-Generated Page will be related to the discussed case? 



Thank you in advance,

Roman

Show all comments



Hello,

I want to create a new minipage to add a contact with only 3 fields ...

That minipage will contain 3 fields : First name, Last Name, Email and Phone (all fields mandatory), a "Save" button that create the new contact and close the little window ...

How can i do that? And how can i call this minipage clicking on a dedicated button?

 

Very thanks for all,

 

Davyd REY

 

 

Like 0

Like

1 comments

Dear Davyd,

There is a possibility to add the mini page to any section. Its implementation is described on our academy: https://academy.bpmonline.com/documents/technic-sdk/7-11/how-create-mini-page

Please also note that there is a configured mini-page for the Contacts section. This page can be enabled/disabled in the System designer → System settings → Enable contact mini page add mode.

If you want to modify this page, you need to do that in the replacing client module choosing the contact mini page as a parent object: https://academy.bpmonline.com/documents/technic-sdk/7-11/client-modules

Best regards,

Lily

Show all comments

Hello,

I can't seem to find the search box on the community page.  I tired both chrome and edge. 

Where did it go?

https://community.bpmonline.com/

 

 

Like 0

Like

2 comments

I see the search is back

Dear John,

In case the issue occurs again, please send this info to the support team so that we will be able to process this request.

Best regards,

Lily

Show all comments
Question

Hello There,

can anyone please tell me what are system requirements in order to start developing system in house.

 

Thanks

Like 0

Like

1 comments

I was wondering if there are working projects of the different public integration methods out there in the community before I reinvent the wheel; besides what is in the development manual, like on GitHub or on this site. I'm looking for actual Visual Studio projects or solutions; boilerplate if you will.  I'm only interested in integration, not BPM customization.  

Second question, where do you find the latest Terrasoft assemblies, if you are working with the cloud version only, not on premise. 

Thanks everyone.

Like 1

Like

1 comments

The project in the article by the link below is working properly. I tested it last month.

https://academy.bpmonline.com/documents/technic-sdk/7-11/working-bpmonl…

Additionally, please check how to track the integration with fiddler. This will help you a lot.

https://academy.bpmonline.com/documents/technic-sdk/7-11/executing-odat…

If you need bpm'online on-site, please email to support@bpmonline.com 

Please note that you will not be able to open bpm'online solutinon in VS, build it and run. Bpm'online is not OpenSource. However, on-side installation allows attaching visual studio and debugging. 

Show all comments

Hi all,

2 days ago I posted asking for odata query with relationship: https://community.bpmonline.com/questions/odata-joins

I solved this issue and I posted a solution for that.

I come back because I made working querys with 1/1 relationship but not 1/n for example the idea is to get all the contacts for a particular account:

https://URL/0/ServiceModel/EntityDataService.svc/AccountCollection(guid…

I get the attached error.

Do i have an error with the relationship names? It's possible to do in bpm'online ?

Kind regards

File attachments
Like 0

Like

3 comments

Dear Uriel,

You can achieve such task by referring to the contact collection, filtering the results by Account Id. 

The request line should look like this:

// GET <BPMonline application address>/0/ServiceModel/EntityDataService.svc/ContactCollection?$filter=AccountId eq guid'00000000-0000-0000-0000-000000000000'

You can find more filter usage here:

https://academy.bpmonline.com/documents/technic-sdk/7-8/working-bpmonli…

Also, in case you use $expand in your requests, please, take into account, that in this case OData is limited to not more than13 objects to return (see info box).

https://msdn.microsoft.com/en-us/library/gg309461(v=crm.7).aspx#BKMK_ex…

Regards,

Anastasia

Anastasia, how are you?

thanks for the comment.

We need something different. The query would be from 1 to N, for example from an account bring all contacts as a collection and for each contact for example bring us all the addresses.

Thinking of an XML response we should have something like this:

 



<?xml version="1.0" encoding="UTF-8"?>

<Response>

       <Account>

              <Name>Coca Cola</Name>

              <Contacts>

                     <Contact>

                            <Name>john</Name>

                            <Addresses>

                                   <Address>234 street</Address>

                   <Address>2234 street</Address>

                               </Addresses>

                        </Contact>

                     <Contact>

                            <Name>Peter</Name>

                <Addresses>

                                   <Address>234 street</Address>

                               </Addresses>

                        </Contact>

                     <Contact>

                            <Name>Caroline</Name>

                        </Contact>

                 </Contacts>

          </Account>

   </Response>



thank you very much.

Kind regards

Uriel,

Unfortunately, possibility to expand collection is not yet implemented in the system. However, please feel free to use the above mentioned approach, as a workaround. 

Regards, 

Anastasia

Show all comments

Looking at creating leads via the Web-to-Object service but sourced not from a web landing page but an API service.  The documentation seems to imply I can do this as this is an external system.

I was trying to post JSON data to this Web-to-Object service from Zapier with their generic POST action.  The process runs successfully, but a "Not allowed request URL" message is returned from my bpm’online instance or landing page record.  I know from a previous forum post here the Website Domains property needs to be set properly.  I have tried their domain, subdomains, and others per their support (e.g.  hooks.zapier.com).

Is the Website Domains “whitelisting” feature only apply to actual web page sources or does this restriction work with external services like Zapier (or Mulesoft, custom)?  Any help to POST to these bmp'online service via Zapier or other external process would be welcome.

Service Output

{
    "SaveWebFormObjectDataResult": "{resultMessage:\"Not allowed request URL.\",resultCode:-1}"
}

 

Like 0

Like

1 comments

Hello Community!

Any have a example to send a notification menssage from script task c#?

The idea is make a foreach and for each value send a notification to the user.

Regrads, 

 

Like 1

Like

2 comments

Dear Federico,

Here's the example for you:

//create reminding
/**
                 * @param addresserContactId // select Id from Contact
                 * @param addresseeContactId //select Id from Contact
                 * @ RemindTime {DateTime}
                 * @param description {String}
                 * @param subjectRecordId //select Id from [your schema]
                 * @param sourceId // select Id from RemindingSource --where Name = 'Owner' or Name = 'Author'
                 * @param sysSchemaUid //select Uid from SysSchema where Name = [your schema]
                 * @param subjectCaption {String}
                 * @param typeCaption {String}
                 *
                 * return {Terrasoft.Collection of InsertQuery}
                 */
                createRemindingInsert: function (addresserContactId, addresseeContactId, remindTime, description,
                                                 subjectRecordId, sourceId, sysSchemaUid, subjectCaption, typeCaption) {
                    var insert = Ext.create('Terrasoft.InsertQuery', {
                        rootSchemaName: "Reminding"
                    });
                    insert.setParameterValue('Id', Terrasoft.generateGUID(), Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('CreatedOn', new Date(), Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('CreatedBy', Terrasoft.SysValue.CURRENT_USER_CONTACT.value, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('ModifiedOn', new Date(), Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('ModifiedBy', Terrasoft.SysValue.CURRENT_USER_CONTACT.value, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Author', addresserContactId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Contact', addresseeContactId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('RemindTime', remindTime, Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('Description', description, Terrasoft.DataValueType.TEXT);
                    insert.setParameterValue('SubjectId', subjectRecordId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Source', sourceId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('SysEntitySchema', sysSchemaUid, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('SubjectCaption', subjectCaption, Terrasoft.DataValueType.TEXT);
                    insert.setParameterValue('TypeCaption', typeCaption, Terrasoft.DataValueType.TEXT);
 
                    return insert;
                },
                /**
                 *
                 * @param remindingInsertCollection {Terrasoft.Collection of InsertQuery}
                 * @param callback
                 */
                executeReminding: function (remindingInsertCollection, callback, scope) {
                    var batchQuery = Ext.create("Terrasoft.BatchQuery");
                    Terrasoft.each(remindingInsertCollection.getItems(), function (insertQuery) {
                        batchQuery.add(insertQuery);
                    });
                    batchQuery.execute(callback, scope);
                }

Lisa

Lisa Brown,

Hi Lisa. Its been a few yrs since your reply. Is there a better way to do this in the product now? The code you have mentioned writes to the DB and triggers an execute. 

Show all comments

Hello everyone!

How are you? I hope you can help me!

I want to add a column with a link, to set URL of that link I need to get the value of another column hidden in the grid, How could I do this? I do not want to show the column because it takes up a lot of space. I overwrote the method addColumnLink but the line "this.get("someColumn") does not work if the column is hidden. In this case, the column hidden is "UsrRutaArchivo"

I attached images

Thanks in advance!

King regards!

Ezequiel Gomez!

Like 0

Like

1 comments

Dear Ezequirel,

You can call initQueryColumns function in your section schema, so to load all columns. In the function, call addAllColumns you have overridden. In this case, you will be able to access not displayed column in the grid by "this.get("Column"); Please see the example below:

initQueryColumns: function(esq) {
     this.callParent(arguments);
     this.addAllColumns(esq);
},

Hope you find it helpful.

Regards,

Anastasia

Show all comments

I'm trying to create a dashboard to compare our sales pipeline to our forecast data. I've created the opportunity series of the dashboard; however, I'm stuck on the forecast portion. Is creating this dashboard possible? And if it is, can someone please explain how I'd go about creating it? I've created all of the other dashboards we need, but this one has me stuck. Help!

Like 0

Like

2 comments

Dear Jess,

Unfortunately, there is no option to create a dashboard based on the [Forecasts] section because it uses tables of other sections in the Data Base. As an alternative, you can build charts on objects of [Opportunities] and [Invoices]. 

We have registered the suggestion to allow building the dashboards based on the forecasts directly. Our R&D team will consider it for the further releases. 

Lisa

Lisa Brown,

Is there any news about this topic? 

Thanks 

Show all comments