change TargetType on coresuite billingwizard
Frans Rampen
Hello,As we still haven't a solution to this problem: [url="http://forum.coresystems.ch/index.php?/topic/4999-target-type-within-billing-wizard/"]http://forum.coresystems.ch/index.php?/topic/4999-target-type-within-billing-wizard/[/url] i want to solve this by using coresuite customize. I have added the following code to the doubleclick on the column header in the billing wizard form:
[CODE]
try
{
if(pVal.Row == -1)
{
Grid mTargets = Grid.GetFromUID(pVal.Form, "G_PC_Obj");
pVal.Form.Freeze(true);
for(int i = 0;i < mTargets.Rows.Count;i++)
{
mTargets.SetValue("TargetType", i, "15");
}
}
return true;
}
catch(Exception ex)
{
StatusBar.WriteError(ex.Message);
return false;
}
finally
{
pVal.Form.Freeze(false);
}
[/CODE]
This code does update the TargetType of all row to delivery, but as soon as i click next, on the overview page all targettypes are still set to invoice! It appears i have to open de comboboxes by hand to have them changed. How can i solve this or why is this happening?
Frans
Frans
Frans Rampen
Noone can help with this? Please help!Frans
SeKo
Hi Frans,maybe you can cast the cell to a GridComboBox (or something like that), and use the select method, I think that's better then just setting the value in the cell (I think it doesn't launch any handlers linked to that comobox)...
It's just a guess, I'm by far an experienced Coresuite programmer..
Frans Rampen
Hello Seko,Yes exactly but i'm also struggling how to do this. Can anyone help with a small code sample how to cast a gridcell to a combobox?
Regards,
Frans
SeKo
Hmm.. true... You can only do it on columns.... sorry.. don't think this will help youFrans Rampen
Somebody can help witrh this? To change more then 500 rows by hand every time we use the billign wizard is starting to pi$$ off my employees..Paolo Manfrin
Hi Frans,even if you change the UI, you would not be able to change the logic behind it. Anything you would set via customize would not be taken into cosideration in code.
Please could you give us a use case why you are trying to do that? Either we can speed-up the development or give you a workaround.
Kind Regards,
paolo
Frans Rampen
Hello Paolo,The problem is; when we run the invoicing wizard, the targettype of all rows which are going to be billed are default at targettype 'Invoice'. In our case we need this to be 'Delivery'. Right now we need to manually change each row to the delivery targettype. I'm sure it is very easy to add a default setting for this so when we fire up the subscription billing wizard all rows are by default set to 'Delivery'
Does this make it clearer for you?
Regards,
Frans
Frans Rampen
Paolo? It's almost the first of the month..Paolo Manfrin
Hi Frans,is this for Service Call or Subscriptions? Thank You. Paolo
Frans Rampen
Hello Paolo,This is for subscriptions
Paolo Manfrin
Hi Frans,I scheduled this possibility for next release.
At the moment there is one event provided: AddTargetObjectEventAddTargetObjectEvent but this applies only to service calls and not to subscriptions.
Kind Regards,
paolo
0
Please sign in to leave a comment.
Comments
0 comments