Recent Posts

Pages: [1] 2 3 ... 10
Sedna (Pivotal 6) / Re: ProductivityPack TabTools - samples
« Last post by Misiu on August 17, 2018, 01:44:27 AM »
Hi MarcK4096,

thank You for reply.
I know that the only way to hide tab in winforms tab control is to remove that tab and add it again when I want to show it.
I've used PP as You showed.

In `OnFormInitialized` I'm creating reference to my tab page like this:

Code: [Select]
private TabPageLibrary _tpl;

public override void OnFormInitialized()
    if(_tpl == null)
        _tpl = new TabPageLibrary("MyTabPage", FormControl);


private void ShowCorrectTabs()
        int productType = Convert.ToInt32(PrimaryDataRow[Common.Data.Client.Field.ProductType]);

        if (productType  == 0 && _tpl != null)
        else if (productType == 1 && _tpl != null)
    catch (Exception e)

I've got additional checks for _tpl != null to avoid any potential errors.

Hope this helps anyone :)

Does anyone have any materials related to PP? Especially samples source code.
Sedna (Pivotal 6) / Re: ProductivityPack TabTools - samples
« Last post by MarcK4096 on August 13, 2018, 10:11:56 AM »
The winforms tab control doesn't actually allow hiding of tabs.  The standard way to do this is to remove the tab from the control when you want to hide it and then add it back when you want to show it.

If you wanted to use the PP for this, you could try the following in your client task code:

var tabPage = new crmc.Foundation.TabPageLibrary("nameOfTab", (CdcSoftware.Pivotal.Engine.UI.Forms.PivotalClientFormControl)this.FormView.FormControl);

One challenge with the Pivotal SmartClient is that it likes to reuse forms as much as possible for performance reasons.  So, if you hide a tab, your code needs to be aware that the next time the form is initialized, the tab might already be gone.  I think one issue with this involves GetControlByName().  With the tab removed, I don't think the children can be found anymore.

Sedna (Pivotal 6) / ProductivityPack TabTools - samples
« Last post by Misiu on August 03, 2018, 03:37:33 AM »
In my environment, I'm using Pivotal Client 6.5.2 and Productivity Pack 4.2.
I'm trying to show/hide PivotalTabPage based on some conditions.

I've found this movie showing Tab Tolls from ProductivityPack.
At 09:10 You can see that there is code that checks user group and conditionally calls Hide() on specific tab.

I've searched all over installers for code showing usage of that method, but I got nothing.

Do anyone have sample code showing usage of Productivity Pack from C#?
CRMCulture isn't existing anymore, so this forum is my only hope.

Any materials and samples are welcome :)
Sedna (Pivotal 6) / Re: Set Pivotal Theme or other options via IafConfig
« Last post by Misiu on July 08, 2018, 11:52:12 PM »
@crmpimp thanks for the update :)
I'm in the middle of testing version 6.6. Finally limited theming is available.
Unfortunately, a lot of my custom code is throwing errors. 90% works great but I must get that last 10% working.
Sedna (Pivotal 6) / Re: Set Pivotal Theme or other options via IafConfig
« Last post by crmpimp on July 05, 2018, 08:02:44 AM »
Just to confirm with everyone - theme-ing is basically available with Pivotal 6.6.

Yes - you can finally more away from the tired old 'sky blue' theme! Yay! Note that there are still some limitations (and a lot of them), but change is in the wind!
@MartinR I've did like You suggested.

The downside is that I must define two methods in Server Task. For example:
Code: [Select]
public ServerTaskResult GenerateDocuments(string package)
    return GenerateDocuments(wywiadownia, null);

public ServerTaskResult GenerateDocuments(string package, string guid)
    //here real implementation

Inside Server Task I'm calling this method:
Code: [Select]
ClientNotifier.Publish(guid, $"Generowanie {current}/{total}...");

ClientNotifier is my custom class that push messages via sockets to all subscribed clients.

From client side I'm calling my Server Task using my extension method:

Code: [Select]
SystemClient.ExecuteServerTaskAsync("Generator", "GenerateDocuments", new object[] { "Package 1" }, "Trwa generowanie paczki...", () =>
    var searchView = ClientContext.ClientAPIService.GetActiveContentObject() as ISearchView;
}, true);

This is how this looks on client (of course spinner is spinning :)):

This method allows me to show some kind of progress, because by default client "freezes" when You call Server Task and wait for result.
That's an option, but this way I must modify all Server Tasks (unfortunately Pivotal cant handle default parameter values  :-\)

For now I'm updating my two test Server Tasks with that additional parameters, hopefully it will work fine.
Ideally I'd like to get that name in Server Task code.
Why not just pass it as one of the parameters?
When creating Server Task in Toolbox we must give is a name, then we can use that name to call that Server Task from Client code:
Code: [Select]
SystemClient.ExecuteServerTask(taskName, methodName, types, parameters)
I'm wondering if there is an option to get than Server Task name inside Server Task method (when it is executed).
For example:
1. I've created new Server Task in Toolkit. It is names "Sample" and has full class name: "AA.Server.Prototype.VersionOne".
2. I'm able to call method "Test" from my new Server taks using this code:
Code: [Select]
SystemClient.ExecuteServerTask("Sample", "Test", types, parameters)
Now I need to get string "Sample" (because that's the name of my Server Task) when executing method "Test"

I can get qualified class name and method name, but I need Server Task name.
I hope this is clear enough.

I need this to create notification system that will notify end user about server task progress, after finishing I can share some details about it.
Pivotal UX Client / Create a copy of secondary datatable
« Last post by komgbu on June 05, 2018, 01:54:36 PM »

Does anybody know the best approach for making this?
I think we have two ways (probably one of them is wrong...):
1) make a new server task with parameters: MakeCopy(old_record_id, new_record_id)
and inside this method retrieve all linked secondary records and make copies, and just link them to the new main record. In this case, a record with new_record_id must exists in the DB.
Then call this task from UX form (button)

2) try to pass field names/values for all secondary records through the TransitionPointParamaters (for example, userDefinedParameters)
but I'm not sure how to transfer field names / values / types properly...
If I try to use just a simple array of dictionaries to do this - it won't be transferred anyway (probably because of invalid Uxc.lib.types.NetType ... as it is the third parameter in setUserDefinedParameter( index, value, type ))... Probably I can have just a "virtual" datasets (main + secondary) and ability do not save new record with all secondaries at all...

Pages: [1] 2 3 ... 10