I am using xero-java-sdk. I am looking at updating an existing contact. There is a method in accountingApi
updateContact(contactId, contacts)
It is not clear on how to use that method. Can someone give an example on how to use.
Related
I am working on a script (which is in Python) for doing some management on our Magento environment.
Now I am wondering if I can create categories with assigned ID.
I think this might be impossible due to key constraints. But is there a way?
Just putting category_id in the parameter list in catalog_category.create, it does not work, it just skips the parameter.
The main reason of wanting this is because I need to know the category ID in order to create the subcategories.
I do know the Magento API returns the ID of the created category. But, I have no way of knowing what subcategories are supposed to go to that created category. (Or I can rewrite a load of code, which I am not too fond of...).
So I was thinking this was the easiest way to go with right now.
Any suggestions, comments, answers? Anything is appreciated!
No, you can't. Magento's entity IDs are for Magento so you cannot specify what you'd like them to be.
When you create an entity with the API it will return the new ID, as you've said.
For your use case it might be easiest to add a new attribute to your categories in Magento, call it "my_category_id" or something and allow your API to set that instead.
Good day Everyone,
I am using Workato and I want to create a recipe that will add multiple person to a specific contact in Xero. At the moment, I've tried to use foreach loop in workato and inside in it, I add a person to a specific contact. But it seems like during the creation of new person, it will only override the existing person in xero therefore only one person will be saved. Does someone know how to fix this problem? Please help.
You could use Add person(s) to contact action to add multiple persons to a contact.
Im using dynamics CRM 2011.
I took a look at the entity called contact.
This entity has a fullname primary field that is automatically populated.
This field is not visible to the crm user when creating a new contact.
I was wondering how do I achieve the same with custom entities?
Do I use workflow to update the primary key field and hide the field from the crm users?
Thanks
That would be one (and the easiest) way to do it, stick a workflow on the create and update of the relevant fields - though users would have to wait a couple of minutes to see the change.
Other options could be a plugin if you want the field to be updated synchronously, or you could use JavaScript to show the field before the record is saved.
You could use the a AutoNumber Plugin here, there is one on CodePlex (I havent used it myself): http://crm2011autonumber.codeplex.com/
So I'm using Core Data in an existing iPhone app, and I've set up two entities: Person and Item. The root view of my app's navigation (currently) shows a list of people, and you drill down from there to items. In short, the hierarchy looks like this:
Person -> Item
I want to add a new entity above Person in the hierarchy, called List:
List -> Person -> Item
Additionally, I want the user's first List to be created for them on startup, and for any People the user's already added to be assigned to that list.
I'm familiar with Core Data's lightweight migration & versioning feature, so I think I know how to add the new entity and relationship, but I'm not sure how to:
Create a List record on app start if they've never had the Lists feature before
Set all existing People records to belong to that new list.
One quick and dirty way would be to add some code to my app delegate's applicationDidFinishLaunching method that performs the migration by (1) checking to see if there are any Lists, (2) if not, creating the default one, (3) fetching all existing People from my data store, (4) setting each Person's list attribute to the newly created default list, and finally (5) saving those changes.
My question is: is there any faster or easier way to do all of that?
That's pretty much what you'd want to do. Use an NSFetchRequest to see if any Listss exist. If not, create one. Then do another request to get all the Persons. Here, instead of assigning the list property of each Person, I'd create an NSSet containing all your Persons and assign that to the List's people property. You did create an inverse property, right?
This is actually a pretty lightweight operation, all tolled, so I wouldn't worry too much about performance. Unless you've got hundreds or thousands of Person objects, your user will probably won't even notice.
I was wondering how you actually remove objects from the Calendar Store, I've looked at the documentation and it only mentions how to add objects but nothing about removing.
How would I remove an object from the calendar store?
How would I remove an object from the calender store?
Buy out their stock!
Serious answer: The CalCalendarStore object responds to two messages that remove a calendar item: one for events, the other for tasks. Use whichever one is appropriate to the item you want to remove.
As Peter points out in his comment; it isn't enough to identify a CalTask just by it's title.
So, how do you uniquely identify a task?
If you look at the documentation for CalTask you will see that it is a sub-class. The super-class has a property which you can use to uniquely identify objects of that super-class, and because CalTask is a sub-class, it too has that property.
Have a look at the code that you used to create those tasks in iCal. When you create each task you can inspect its properties for that property and store it in your model. Then, when you come to delete the tasks from iCal, you can use that property to uniquely identify the task that is to be deleted.
I make no apologies for not being more specific in this answer. You'll need to read the documentation and try and write this for yourself. You'll need to make changes in more than one place in your app:
Change the model so that you can store this unique identifier for the tasks you create.
Change the method that you use to create and add task to the Calendar Store so that you get this identifier and store it in your model.
Make use of this identifier when you are trying to identify the tasks in the Calendar store that you want to delete.