Retracting a discount when user property changes
I have set up a discount to be used in conjunction with a campaign. The campaign scenario is that a certain user property foo is set to true. When foo becomes false for a certain customer, how can I retract the discount? I can't set usage counts or an expiration date.
Essentially the functionality I want is, "Give customer x a discount only while he is in group y."
Is this possible?
Thanks.
kinman
I resolved this by directly deleting from the discount_association table for this user and this discount. I wasn't able to find an API call that would do this. If anyone has a more elegant solution, I'd be curious to see it.
Similar Messages
-
Hello There,
I have written an Outlook Add-In to add several User Properties to our incoming emails. This add-in will be installed in 100 computers in different states and our Exchange server is hosted in our datacenter in CA.
Everything works great but there is an odd thing happens and that is when one PC changes a UserProperty Value all the other PCs show up that change on their outlook UIs but when I get the MailItem object from the same other PC is
not showing the changes. But if I shutdown outlook on that PC and open it up again the changes will be showing up in the MailItem object. It seems to me that MailItem doesn't refresh but UI does.
Does anyone know how I can refresh the MailItem after its UserProperties has been changed from another pc in a shared account environment.
These are my codes to save a property and show all properties:
Public Sub SaveUserProperty(xName As String, xValue As String)
Dim ns As Outlook.NameSpace = Me.Application.GetNamespace("MAPI")
Dim oMailItem As Outlook.MailItem = Nothing
Dim oUserProperties As Outlook.UserProperties = Nothing
Dim oUserProperty As Outlook.UserProperty = Nothing
Try
oMailItem = ns.GetItemFromID(curMailId)
oUserProperties = oMailItem.UserProperties
oUserProperty = oUserProperties.Find(xName)
If oUserProperty IsNot Nothing Then
oUserProperty.Value = xValue
End If
oMailItem.Save()
Catch ex As Exception
MsgBox(String.Format("{0}: {1}{2}", "SaveProperty", vbTab, ex.Message))
Finally
If Not IsNothing(oUserProperty) Then
Marshal.ReleaseComObject(oUserProperty)
oUserProperty = Nothing
End If
If Not IsNothing(oUserProperties) Then
Marshal.ReleaseComObject(oUserProperties)
oUserProperties = Nothing
End If
If Not IsNothing(oMailItem) Then
Marshal.ReleaseComObject(oMailItem)
oMailItem = Nothing
End If
If Not IsNothing(ns) Then
Marshal.ReleaseComObject(ns)
ns = Nothing
End If
End Try
End Sub
Public Sub ShowUserProperties()
Dim builder As StringBuilder = New StringBuilder()
Dim ns As Outlook.NameSpace = Me.Application.GetNamespace("MAPI")
Dim oMailItem As Outlook.MailItem = Nothing
Dim oUserProperties As Outlook.UserProperties = Nothing
Dim oUserProperty As Outlook.UserProperty = Nothing
Try
oMailItem = ns.GetItemFromID(curMailId)
oUserProperties = oMailItem.UserProperties
For Each oUserProperty In oUserProperties
builder.AppendFormat("{2}:{0}{3}{1}", vbTab, vbNewLine, oUserProperty.Name, oUserProperty.Value)
Runtime.InteropServices.Marshal.ReleaseComObject(oUserProperty)
Next
If (builder.Length > 0) Then
System.Windows.Forms.MessageBox.Show(builder.ToString(), "The UserProperties collection")
End If
Catch ex As Exception
MsgBox(String.Format("{0}: {1}{2}", "ShowUserProperties", vbTab, ex.Message))
Finally
If Not IsNothing(oUserProperty) Then
Marshal.ReleaseComObject(oUserProperty)
oUserProperty = Nothing
End If
If Not IsNothing(oUserProperties) Then
Marshal.ReleaseComObject(oUserProperties)
oUserProperties = Nothing
End If
If Not IsNothing(oMailItem) Then
Marshal.ReleaseComObject(oMailItem)
oMailItem = Nothing
End If
If Not IsNothing(ns) Then
Marshal.ReleaseComObject(ns)
ns = Nothing
End If
End Try
End SubOutlook will not see the latest changes downloaded from Exchange (or changed through MAPI bypassing the Outlook Object Model on the local machine) until the MailItem object is completely released and reopened. The explorer list shows the changes since it
is fed off the underlying folder contents table, not the cached MailItem object.
There is nothing you can unless you make sure the MailItem object is released and is never kept referenced fro any prolonged periods of time.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.5 is now available! -
How to force updatedisplaylist in a skin when custom property changes
Hi Folks,
I have created a custom component based on a Spark Button. In that custom component I have added a single, public, bindable property - let's call it Fred.
I also have a custom skin, based on the Spark Button skin. It's basically just like the delivered skin, just a bit different graphics stuff. I have applied the custom skin to the custom button component. So far, so good. However...
When a user action causes the Fred property to change on a custom button instance, I need my custom skin to re-draw something. It appears that I need the skin's updateDisplayList function to fire. Unfortunately, it appears that the only time that it fires is when "real" properties are changed, like 'left' or 'width'. How can I get the custom skin to updateDisplayList when this fake, custom property changes?
p.s. - the custom skin can 'read' the custom Fred property just fine. And, if I set the Fred property and then 'mouse over' the custom button instance, the updateDisplayList fires...too late of course, but it does fire.
I have read the docs, but there is not much written about updateDisplayList, or when it fires, or how to make it fire.
Thanks,
-DavidGood question...in my skin's 'creationComplete' event I call a function in the skin. That function 'evaluates' the host component's Fred propertey, and based on what it finds, it draws some stuff:
protected function doSpecialDrawing():void
var hostFred:String = hostComponent.Fred;
if (hostFred == "certain_value")
//set some property in one of the path objects in my skin to a certain value
else if (hostFred == "other_value")
//set some property in one of the path objects in my skin to some other value
When I created the skin, I did not anticipate the need to dynamically respond to setting the Fred property/value.
I've placed a call to the 'doSpecialDrawing' function inside the skin's updateDisplayList, but unfortunately, the updateDisplayList does not seem to get called in real-time when I set the Fred property in a custom button instance.
I'm all ears here... still a beginner/novice with Flex...
Thanks,
-David -
Core data: making object related to another object when a property changes
ok, say with core data I have object1 and it has a to-many relationship with object2
and when property1 if object1 changes then the number of/contents of the related object2 changes as well
think of a box of chocolate... object1 is the box and object2 is the chocolate... object1 has a string property that is the colour of the chocolate and when it changes the chocolate objects need to change accordingly
maybe not the best example but you guys should get the idea
I'm not sure how to do this without causing errors
what I did initially was this:
-(NSString*)words {
printf("retrieving words
[self willAccessValueForKey: @"words"];
NSString* s = words;
[self didAccessValueForKey: @"words"];
return s;
-(void)setWords: (NSString*)newWords {
printf("setting words
[self willChangeValueForKey: @"words"];
words = newWords;
[self didChangeValueForKey: @"words"];
- (void)setNilValueForKey:(NSString *)key {
printf("in nil value
if ([key isEqualToString:@"words"]) {
self.words = @"";
else {
[super setNilValueForKey:key];
which has broken the redo
I went ahead anyway and redone the setWords
-(void)setWords: (NSString*)newWords {
[self willChangeValueForKey: @"words"];
words = newWords;
[self didChangeValueForKey: @"words"];
// NSManagedObjectContext *managedObjectContext = [self managedObjectContext];
// [[managedObjectContext undoManager] disableUndoRegistration];
NSArray* linesWords = [newWords componentsSeparatedByString: @" "];
NSSet* newContainsWords = [NSSet set];
[self removeContainsWords: self.containsWords];
for(unsigned int i = 0; i < [linesWords count]; i++) {
NSEntityDescription* entity = [NSEntityDescription insertNewObjectForEntityForName: @"AtomWord"
inManagedObjectContext: managedObjectContext];
AtomWord* wordEntity = (AtomWord*)entity;
wordEntity.word = [linesWords objectAtIndex: i];
newContainsWords = [newContainsWords setByAddingObject: wordEntity];
[self addContainsWords: newContainsWords];
// [managedObjectContext processPendingChanges];
// [[managedObjectContext undoManager] enableUndoRegistration];
this too also broke the redo
I uncommented the undo manager stuff to see what would happen, thinking it would group everything together for the undo-redo
but instead it made two copies of object1...
what's the best way to do this?I don't see an option to upload images so I'm going to assume you can see this ascii representation of it
|----------------| |----------------|
| Line | | Word |
|----------------| |----------------|
|v Attributes | |v Attributes |
|lineOfWords | |theWord |
|----------------| |----------------|
|v RelationShips | |v RelationShips |
|madeUpOf |<----->>|containedIn |
|----------------| |----------------|
lineOfWords and theWord are string properties
when lineOfWords changes I need the set of Words it contains to change to reflect the change in lineOfWords
The reason I need words to be an entity itself is because each word has attributes (not shown there) that are specific to each word
This is how I made the schema, I'm not sure how or if you can reflect the relationship between the property and list or if there is a better way to do it... -
User Password change fails in OWA 2013
User Password change fails in OWA with this error: Your password couldn't be changed. Make sure the old password you typed is correct and that the new password meets the minimum security requirements.
We are migrating from Exchange 2007 to Exchange 2013. Have mailboxes in both environments. OWA 2007 password changes succeed (user mailbox is still in Exchange 2007). When the user mailbox is moved to Exchange 2013, password changes fail
with the above error.
We have the Exch 2013 servers are on Windows 2012 and we are running Exch 2013 CU3. We have made changes to the Default Role Assignment Policy to prevent users from changing Contact information and setting user photos, etc. We are not exactly
sure when user password changes stopped working, or even if they ever did work, although we recently installed our Prod Exch 2013 servers alongside our 2007 servers without any RBAC delegation implemented and a quick test of a user password change was successful.
I reversed all the changes to the Default Role Assignment Policy but the password change still fails.Hi,
Please try the following steps in your CAS server:
1. Click Start > Run and type regedit and click OK.
2. Navigate to the "HKLM\SYSTEM\CurrentControlSet\Services\MSExchange OWA" key.
3. Set the ChangeExpiredPasswordEnabled value from 1 to 0.
4. Close regedit and re-open it.
5. Set the ChangeExpiredPasswordEnabled value from 0 to 1.
6. Close regedit.
7. After you configure this DWORD value, please reset IIS. The recommended method to reset IIS is to use IISReset /noforce from a command prompt.
Here is the similar thread about password change issue in Exchange 2013 CU3, please refer to:
http://social.technet.microsoft.com/Forums/en-US/30b74c81-9b98-46f4-9ca0-1c3bb74f4a3f/users-with-expired-passwords-or-change-password-at-next-logon-unable-to-change-password-via-owa-in?forum=exchangesvrclients
Hope it helps.
Thanks,
Winnie Liang
TechNet Community Support -
Identify when a user has change value in USEREXIT_CHECK_VBAP before saving
I originally posted and closed this question, but I am still struggling with the code.
The req is now to also update the value of VBAP-LPRIO, so I now have to use the Exit : USEREXIT_CHECK_VBAP.
The issue is that my solution must take into account when a user manually overwrites a value and not replace it with a value determined in the user exit.
My problem is that the user might do the following
1 - Create a sales order and enter a new item line, press enter
2 - The user exit is triggered, and I check that XVBAP-UPDKZ = I (user add a new line)
3 - The user-exit determines the new value and populates the field
4- the user then click on the item line, and then manually changes the value of VBAP-LPRIO
5- The user-exit is triggered again, and because XVBAP-UPDKZ = I , my code is triggered and updates the field.
What I want is to identify that a user has manually changed the value and not overwritte the value.
1 - I have check YVBAP and it is blank, as the user has not saved the sales order.
2- The values of VBAP and XVBAP are the same..
3 - I cannot re-read the database (KNVV) table as the user could have populate the value with the same value.
What I need is how to identify when a user has made a change to a field before they save the sales item, as YVBAP is never filled.
Previous post----
Hello,
I am writing a bit of code that will overwrite the payment terms in a sales order item based on a number of factors. (ship-to, incoterms, document type, etc)
I am using the following program MV45AFZB at Exit : USEREXIT_CHECK_VBAP. I am using this exit as the users need to see the payment terms after an item has been entered into the sales order and not have the value determined at sales order save.
I am not using USEREXIT_MOVE_FIELD_TO_VBAP as it is only triggered once at the time of creation and not when I change the document. I need it in USEREXIT_CHECK_VBAP as users could change the incoterms in VA02, so the code must be redetermined.
My code is working as expected, however, I have a problem when a user enters a sales order item line and then manually changes the payment terms, as my code then is over writes the users values.
The flow is as follows
As user creates a sales order
They populate the sales order header
They populate material number and qty
User exit USEREXIT_CHECK_VBAP is triggered and correctly determines the payment terms
The user then double clicks on the sales order item and decides to overwrite the payment terms.
My user-exit is retriggered and check to see if XVBAP-UPDKZ = I (insert)
As it is still an insert, my code triggers.
I have tried to check YVBAP, but no entry exist as it stills is seen as in insert? What I really need to know that while it is still an insert, the user has change the field value and my code should not over write the users value.When do you need to update LPRIO ? When user makes the change at the Payment terms on line item?
Regards,
Naimesh Patel -
When I open ITunes, I get a message that "iTunes has stopped working". I have tried reinstalling iTunes, creating a new user file, changing the startup programs in accordance with articles in iTunes troubleshooting, but am having no success in getting iTunes to stay open. Any fixes for this problem?
-
HI Team,
In ibase component when user change the serial number we need to set date time in Extra attribute filed..if we click edit ,User change serial number after save we need to set date time in Extra Attribute 4 field .
Component - PRDGENSET
In this component there is no attributes,so where we need to implement and how to implement please help.
Thanks
kalpanaHi Abi,
Thanks for your reply..see i debugged..i have put break point in method SET_S_STRUCT method if press enter in serial number ,debuggeris triggered..in SET_S_STRUCT method value getting serial number..so how to write the logic here...
In GET_S_STRUCT method iam getting all attributes but serial number is not filled..So could you please help here what to do..
in set_S_STRCUT method value iam gettin serial number...in collection wrapper iam geting zrealtions if i open attributes_ref -if i pass Attribute value in run time its getting displayed.so how to write the logic based on serial number please help some coding.
Thanks
kalpana -
Change cell's color in jtable when user clicks on it
Hi everyone,
i've got a JTable, and would like to change the background of a cell when user selects it
so i added a mouselistener over my jtable, the mousereleased method looks like this:
public void mouseReleased(MouseEvent e) {
int row = table.rowAtPoint(e.getPoint());
int column = table.columnAtPoint(e.getPoint());
// help needed
}as you see, i found the code to get the index of the cell selected, but i don't find any method in JTable class to get the cell component itself, and to alter its background color
Please notice that the "setSelectionBackground()" in JTable isn't enough, since i would also like to change the color of cells which are not selected when the user select a cell
how could i do that?
Thanks in advance!
edit: i tried the following but it does not work either
public void mouseReleased(MouseEvent e) {
int row = table.rowAtPoint(e.getPoint());
int column = table.columnAtPoint(e.getPoint());
AbstractTableModel atm = (AbstractTableModel) table.getModel();
Component cell = table.getDefaultRenderer(CaseMemoire.class).
getTableCellRendererComponent(table, atm.getValueAt(row, column), true, true, row, column);
cell.setBackground(Color.MAGENTA);
table.updateUI();
}ok i found how to do it
i directly inserted this in the renderer code:
if (row == table.getSelectedRow() && column == table.getSelectedColumn())
cell.setBackground(etc);
(curiously it does not work with "if (isSelected)")
thanks :) -
Message "Do you want to save changes" to save when user clicks on other tab
Hi,
I have a series of tabs embeded from the main template CustomerTemplate.jspx with <af:commandNavigationItem. I have tabs on BasicData, Accounts etc. I have backing bean (including update button for saving the changes in the same) writtend for BasicData.jspx embeded inside CustomerTemplate.jspx, linkewise other tab.
Now, i am capturing the changes being done in BasicData.jspx in the backing bean. When user shifts to other tab by clicking on the same, i need to popup the message "Do you want to save the changes" Yes/No. If use selects Yes, i need to call Save method from the backing bean else ignore and move to other page.
I have written the code in CustomerTemplage.jspx for bringing BasicData.jspx pages as following
<af:commandNavigationItem text="#{res3['cbuca.menu.basicdata']}"
id="pt_cni2"
immediate="true"
selected="#{attrs.mode=='basicdata'}"
action="basicdata"
destination="/faces/CustomerBasicData.jspx"
rendered="#{security.isUserInRole['basicdata,0']}"
partialSubmit="true"
attributeChangeListener="#{viewScope.backing_TestPage.openCustomDialog}"/>
As per the ADF Documentation, attributeChangeListener will be fired once the attributes is changed (like lose focus) and not through programatically to change the attributes. But, it looks like event is not being fired after several test. I have using JDeveloper 11.1.1.0.2. This requirement will be re-usable for saving the changes to other tabs as well.
If anybody suggest with the help of code to solve the acheive my requirement will be greatly appreciated.
Thanks in advance.
Thanks
-MaheshHi Hasim,
Can you please elaborate like whether this code will be done in the Backing Bean or in the form of javascript.
Can you pl. give a brief on the below one with some more code snipets (if available).
((DCIteratorBinding)this.getBindings.get("VOIterator")).getViewObject().getApplicationModule().getTransaction.isDirty();
Thanks Guys for quick reply and help.
--Mahesh -
Issue: When using BW Bex query analyzer users cannot change reporting queries. Any attempt to change queries results in errors.
Error: BEx Query Designer: Run-time error '-2147221499 (80040005) Fatal Error - Terminating
Impact: Business reporting is currently being negatively impacted because users cannot modify queries, cannot change filters for fiscal period and fiscal year.
OS / MS Office Suite being used: Vista & Office 2007
Backend System: BW 2.0B
Frontend System: Being a large organization, we have a controlled environment wherein all users will have the following applications installed by default:
1. SAP Client Base 7.10
2. SAP BW 3.5 Patch 4
3. SAP BI 7.10 Patch 900
4. SAP GUI 7.10 Patch 12
Does anyone has any idea as to why we are getting this error? Is it a Vista issue? Is it a front-end issue?Just a thought - did you guys apply any Microsoft security patches before this started happening - we had a similar issue in other SAP application due to MS security update. Raise an OSS with SAP
-
Change default settings when user share file
When users click on share file default setting is:
Can edit and mark send an email invitation.
Is there possible to change to:
Can view and NOT mark an email invitationHi,
According to your description, you want to change default settings to
can view and uncheck send an email invitation when user share file.
To by default uncheck send an email invitation. Go to the file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\AclInv.aspx".
You can change:
<wssawc:InputFormCheckBox
runat="server"
id="chkSendEmail"
Checked="True"
LabelText="<%$Resources:wss,aclver_SendEmailCheckbox%>"
To
<wssawc:InputFormCheckBox
runat="server"
id="chkSendEmail"
Checked="False"
LabelText="<%$Resources:wss,aclver_SendEmailCheckbox%>"
Here is a similar post, you can use as a reference:
https://social.technet.microsoft.com/Forums/office/en-US/f250aa4a-94f0-4603-9da2-e9040d5d6133/how-to-by-default-uncheck-send-an-email-invitation-when-granting-access?forum=sharepointadmin
To by default can view. Go to the file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\AclInv.aspx".
You can add the following code into the function _spBodyOnLoad():
document. querySelector('[id$=DdlsimplifiedRoles]').value="role:1073741826";
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
'Blank user name' error when trying to change email password
My password on our mail server changed, when I tried to change the password on my Storm 9500 I get 'Blank user name' error when trying to change, but I have typed in a user name!!!!
BLOODY frustrating because now I am not receiving any mails at all, so my business out of the office has come to a standstill!!!!
Vicky
Solved!
Go to Solution.Try changing the email password on your PC, if you are having problems doing so from your device.
From your desktop PC: http://www.blackberry.com/btsc/KB02830
North American Carriers - scroll down to select your carrier
WorldWide Carriers - Find your carrier on the list
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
When user status of notification is changed, i want to do sth.
Hi guru.
When user status of notification is changed, i want to do something.(IW32)
is there any suitable method? (BADI, User-Exit, etc...)
Pls, help me.You can check the exit EXIT_SAPMIWO0_020. You can read the previous status and current changed status using fm STATUS_READ and compare both.
-
Found out when user change something
Hi - Regarding our UI pattern button "Save" initially is disabled - and is activated only when user changes something in form view (change something in InputField or TextEdit UI)
Is it possible in WD to find out this event?
In InputField there is event OnEnter - but this not enough - user may pass the fields with TAB sequence and event is not triggered.Well, I guess it's impossible. You need some action to force propagating data from client to server. And in your case there is nothing -- focus traverse events are not supported.
The only way is to enable "Save" action and skip unecessary updates in action handler.
VS
Maybe you are looking for
-
I tried opening my Mac files to windows by using Macdriver 8, however upon opening the file my previous mac folders were converted to windows shortcuts and upon returning to my mac pc, all my folders has a .lnk file extension which I cannot open. Nee
-
How to install Os 9 to use classic aplications on a fresh Tiger systemCa
How can I install Mac Os 9 to use classic Aplications if I Just have,Tiger system on my g4, Please Help, where do I find info about this, Do I have to erase everything and start Installing 9 system and upgrade to tiger ???? Please Don't
-
RE: (load : class not found) for IE.5 browser
Hi I try appletviewer example1.html can do this class. But use IE.5 browser can't try this class show load : class Cor1 not found when mouse over it (my class include "import javax.swing.*;") Please help me thanks a lot David
-
Source:Essbase, how to convert char in date format
Hello Version OBI EE:10.1.3.4.1.090414.1900 Source:Essbase We have date in format VARCHAR (01.01.2008). I want to have date in format DATE. I transform our date on Business Level in DATE (yyyy-mm-dd) CAST ( SUBSTRING(Copeck."Time"."Gen5,Time" FROM 7
-
How can I programmatically hide a column in OAHGridBean
Dear all, I face a problem while I need to hide a column for an OAHgridbean in runtime. Could anyone please help? Thanks, Desmond