calling saveAsync changes ChangeKey - outlook-web-addins

Calling Office.context.mailbox.item.saveAsync on a draft message without changing the message itself changes the value of the ChangeKey.
Since Outlook JS does not provide event notifying of property changes ( on an item ), I was going to compare ChangeKeys of the draft message over time. To do so, one needs to get a rest Id first. Office.context.mailbox.item.Id is undefined for draft, forcing a call to SaveAsync, which then changes the ChangeKey, which defeats the purpose of the exercise ( as we'll incorrectly assume that the message has changed ).
Outlook team, is this something you are going to fix? What's the workaround to find out if a draft item has changed?

Related

NetSuite: Calling an API in real time as field values get updated

I'm looking for a way (using SuiteScript 2.0) to handle real-time persistent (stored) field updates, where a field might have changed in NetSuite (for example a lead time was just updated), and it doesn't matter if a user saved the change, or some other automated process changed that field. I just want to be able to pick up on that change:
The moment that it's done, and
Without regard for who or what kicked it off (e.g. it could be a person, but it could also be an automated change from a workflow, or a formula on the field itself which pulls values from another field)
Doing some research I found some options that looked somewhat promising at first. One being the afterSubmit event in a client script, and the other being the fieldChanged event. My issue however is, from what I understood those only really seem to be triggered by a user manually going in and making those changes, but this is only one part of the puzzle and doesn't seem to cover changes made outside of the scope of the user making those changes. Is that correct however? Or would one of those events still be able to capture changes done to that field regardless of who (or what) initiated or triggered the change, and right at the moment the change was saved/ persisted to the database?
UserEvents are basically triggers. In their deployment records you can set the context in which they fire so you can get them to fire in all circumstances (called contexts in Netsuite) but one.
That circumstance is User Events are not fired for record saves made in User Event scripts. i.e., if an AfterSubmit UserEvent script loads, changes and saves your record a fresh user event will not be fired.

How to undo receive payment for invoice in quickbook desktop edition using qbfc sdk

I use QBFC v13 and asp.net with c#. I have create one invoice and paid some amount for this invoice, problem is that now i want to undo payment for this invoice.I try this but not working.
ITxnDel txnDelRq = RecPayrequestMsgSet.AppendTxnDelRq();
txnDelRq.TxnDelType.SetValue(ENTxnDelType.tdtReceivePayment);
txnDelRq.TxnID.SetValue(TxnId);
So if you look at the Exception, you can see that you're getting a response from QuickBooks, and it's an error:
Object 339-1507104811 specified in the request cannot be found.
What QuickBooks is telling you here is that, in your request, you referred to a specific object (the object with TxnID = 339-1507104811) and QuickBooks can not find this object.
That means one of two things. Either:
Somebody else already deleted the object
You're using an incorrect TxnID value
Did somebody else already delete the payment? You? Your program on a previous run?
Are you 100% positive you have the correct TxnID value? It should be from the ReceivePaymentAdd request you initially used to create the payment.

When does Message ID get populated in Lotus Notes?

I'm trying to use the Message ID property on a mailbox item to determine whether it's a journaled or non-journaled item.
When I say non-journaled I mean, calendar events, contacts, drafts.
Is this the right thing to do? Is the Message ID assigned when the item is sent?
The Messsage ID is assigned to the $MessageID item by the router when the message is submitted to be sent. A calendar event will not contain a $MessageId, but a calendar invitation or calendar notice will, because they are processed by the mail system.
However, the presence of a $MessageId item does not necessarily mean the message was mailed to or by the specific mailbox that you are looking at, because a message can easily be copied and pasted between mailboxes.
And it's also true that the absence of a $MessageID does not necessarily mean it wasn't mailed, either. I am almost certain that I've seen cases where messages in a user's Sent folder, and which were actually sent, didn't have the $MessageID. I can't recall the circumstances for that, though. (It's pretty easy for a knowledgeable user to remove the $MessageID item from a message by running a simple agent, so that's an obvious reason why you can't count on the $MessageId being there, but that's not the case I'm thinking of.)(

How to set up an workflow in SharePoint to only work when a specific field is changed and not everytime the item is edited?

The issue is that everytime an item is edited/changed all the users who are set up to receive updates are notified. I need the workflow to run only when a specific field is changed disregarding the others. For example if my item contains these values (Customer Name; Acc#; Contact Person; Address;) - I need the workflow to work only when the Acc# is changed and only if it is changed, no metter how many times the other fields are changed.
Thanks,
A quick way to do it is to have the workflow store the value each time the it starts, then tell it to wait until the field != the stored value. This may not work in all cases, but it could be enough for your purposes.
You should create an event handler to run on your content type or library. You can then check the before and after properties of the fields you mention. Then use the event handler to initiate the workflow if required.

ItemUpdating not showing changed values in SharePoint event receiver

I'm trying to find how a field's value has changed in an ItemUpdating event receiver. The particular field's display name and internal name is Regions.
As soon as ItemUpdating is hit, the value of the Regions field is identical for the following:
properties.AfterProperties["Regions"]
properties.BeforeProperties["Regions"]
properties.ListItem["Regions"].ToString()
I would expect the latter two to contain the old value but surely AfterProperties should be set correctly.
Does anyone know how I can obtain the changed value?
Update: The event handler is attached to a MOSS 2007 publishing Pages list.
I've had a lot of trouble with event handlers on publishing pages libraries. Think it comes from their being other event handlers on there already for publishing. I had better success with updating, can you change to that or do you need the sync event to block the change ?
Are you trying this in a List or Document Library ?
It will work Only on the Doc Lib Please refer to these
MSDN and another on same subject

Resources