Significance of sync key for a Sync Bo

Hi,
What is meant by the sync Key in MI Client application. How is it used to identify a particular sync BO instance.
Is it the same as that of the key field selected in the syncbo mapping.
If the syncbo has multiple key fields what would be the sync key in the application
Regards
Raja Sekhar

Hi Raja,
<<<1>>>
Anyway u will not have any difficulty to find out the SyncKey. It is coming as the first field of the SyncBO instance ,whether it is an item instance or header instance.
just go throught this..
For modifying one  syncbo instance ,
in the meRepMeta.xml file corresponding to that SyncBo ,  allowModify="true".This must be satisfied.
For modifying one  syncbo instance , u can do it like described below..
  Here u must need the sync key of the header .u have to find out this sync key using one of the standard methods(first entry  of a row is sync key of that sync bo instance).
Then to modify the header instance .
1) u can use the standard method <b>modifyRowInDB</b> . here the input parameters are SyncBo name , Sync Key , Value and index of the Column. But the limitation of this method is ,if u have more than one field to modify , then u have to use this method inside the loop. In this method , we are explicitely calling the commit() method . So during looping if one of the modification fails for particular sync bo instance , then we have to manually do the rollback for the previous transactions.
  we can change the method like this..
public void modifyHeaderOfSyncBo(String syncBoName,String syncKey,String headerFieldNames[],String  headerFieldValues[])throws SmartSyncException, PersistenceException
SyncBo syncBo = getSyncBoInstance(syncBoName, syncKey);
SmartSyncTransactionManager transactionManager;
          transactionManager = dataFacade.getSmartSyncTransactionManager();
          if (!transactionManager.isTransactionStarted())
               transactionManager.beginTransaction();
          for (int c = 0; c < headerFieldNames.length; c++) {
               setHeaderFieldValue(syncBo, headerFieldNames[c], headerFieldValues[c]);
//Commit the transaction          
transactionManager.commit();
To modify the Item Instance
In two ways
1) If we know the sync key of the header and there is only one item instance.
Here using the header Sync key , we have to find out the SyncBo instance -->> then find out the item instance / instances
-->> then modify the item.
public void  modifyItemOfSyncBo(String syncBoName,String headerSyncKey,String itemName,String itemFieldNames[],String  itemFieldValues[])throws SmartSyncException, PersistenceException
SyncBo syncBo = getSyncBoInstance(syncBoName, headerSyncKey);
Row [] itemRows = getItemInstances(syncBo,itemName);//this is the standard method.
// itemRows[0] is the one and only item instance
SyncBoDescriptor sbd =
   descriptorFacade.getSyncBoDescriptor(syncBoName);
RowDescriptor rd = sbd.getRowDescriptor(itemName);
SmartSyncTransactionManager transactionManager;
          transactionManager = dataFacade.getSmartSyncTransactionManager();
          if (!transactionManager.isTransactionStarted())
               transactionManager.beginTransaction();
          for (int c = 0; c < itemFieldNames.length; c++) {
          FieldDescriptor fdDesc = rd.getFieldDescriptor(itemFieldNames[c]);
                                setItemFieldValue(fdDesc, itemRow[0], itemFieldValues); // this method is given below
          transactionManager.commit();
2) If we know the  Sync key of the item instance.
    Here what u have to do is find out the particular sync bo item instance and then modify as mentioned above.
Here we know the Sync Key of the item instance ,so here we will get the exact item row instance.So after retrieving the item row instance just modify this item row instance with new values as mentioned above.
This method is for setting values in item instance.Just follow this method
     private void setItemFieldValue(FieldDescriptor fd, Row item, Object value)
          throws SmartSyncException, PersistenceException {
          BasisFieldType bft = fd.getFieldType();
          //                 integer oprator
          if (bft == BasisFieldType.N) {
               NumericField nf = item.getNumericField(fd);
               if (nf != null) {
                    BigInteger ii = new BigInteger(value.toString());
                    //                 nf.setValue(ii);
                    item.setFieldValue(fd, ii);
          //                 charactor operator
          if (bft == BasisFieldType.C) {
               CharacterField cf = item.getCharacterField(fd);
               if (cf != null) {
                    //                 cf.setValue(newValues<i><i></i>toString());
                    item.setFieldValue(fd, value);
          //                 decimal operator
          if (bft == BasisFieldType.P) {
               DecimalField df = item.getDecimalField(fd);
               if (df != null) {
                    if (value.equals(""))
                         value = "0";
                    BigDecimal bd = new BigDecimal(value.toString());
                    //                 df.setValue(bd);
                    item.setFieldValue(fd, bd);
          if (bft == BasisFieldType.D) {
               DateField df = item.getDateField(fd);
               if (df != null) {
                    if (value.equals("")) {
                         Date syDatum = new Date(System.currentTimeMillis());
                         value = syDatum.toString();
                    Date dat = Date.valueOf(value.toString());
                    item.setFieldValue(fd, dat);
<<<<<<<<<<<<<<<<
2. How is the syncbo organized in the mobile device. What is the significance of rows?
Does each row represent one instance of syncbo.
>>>>>>>>>>>>>>>>
  Ur understanding is correct. Data is organized in the form of header and item.
  One Header instance can have 0 , one or more item instances.
  I dont know , how exactly that link is maintained in bw HEADER and ITEM instance. Because i could see only this SYNC_KEY field in the instances.
  I think it might be handled by the SmartSync Framework itself.
<<<<<<
For example each work order would be a row in the work order syncbo.
The fields declared in the getlist bapi  wud be part of header and fields in the Getdetail bapi be the items.
>>>>>>
Number of rows returned by the GETLIST BAPI Wrapper actually represents the HEADER instances in the SmartSync.
We may have 0 , one or more ITEM instances for particular HEADER instance.
(During Sync , First GETLIST collects all HEADER instances . Then looping though each HEADER instance , corresponding GETDETAIL is executed).
<<<<<<
if Getdetail bapi consists of fields from different tables, how are these mapped to the item.
>>>>>>
I didnt get ur question exactly.
Anyway... ,,
  For creating ITEM tables for GETDETAIL , we have to DEFINE one structure , which contain the fields from all tables.
This structure is including as a TABLE parameter of ur GETDETAIL Wrapper. And u will be filling values in these fields that are present in ur STRUCTURE which is included as a TABLE param .
  While Creating SncBOs using SyncBO Builder , u are mapping ur required fields. Only these fields are visible in the client device. Depending upon the
  ugage (i meant whether CREATE Wrapper  , MODIFY , DELETE ) , u can create , modify and Delete these instances.
Refer these links also .. I have already given some  sample codes in these forums.... refer these .. In the generated code itself , some null pointer exceptions are not handled.
In this sample code , that is handled..
Re: Regarding modifying Sync BO
Re: Insert 2 Row (related on the same TopRow) in a syncbo
Re: Order child + item structure in a SyncBo
Regards
Kishor Gopinathan

Similar Messages

  • I do not have my sync key for Firefox Sync how do I recover it?

    I am trying to set up Firefox Sync on a new pc and it is asking for my sync key which I do not have. Is there a way to reset or recover it?

    I can't inspect the sync key on the computer where I first installed sync, becaause the hard drive died and I had to install Linux instead of Windows. I was able to save my user data; what folder would it be in? Can I figure it out from recovering a profile?

  • ColdFusion Builder Preference Keys for FTP Sync

    I was wondering if anyone has been able to setup a customer preference key for synchronize -> Upload in ColdFusion Builder? I use this all the time and it works fine...it is just several clicks to get 'er done. I would love to simply hit a combo of keys to upload the currently active file.
    Thoughts?
    ~Clay

    I agree.  The CF Documentation for both my installs using the standalone CF Builder 3 fail to display any of the Coldfusion documentation.  It shows up in the contents, but fails when I pick any of the available references.  I've posted and asked others and do not get a response.
    This forum is not monitored.  You can see that on the main page where it shows articles about the beta of CF Builder 3.

  • How can it be secure when I did not have to enter the Sync Key on my synced device

    I have just set up Firefox Sync for v6.0.1 on my new Lenovo Laptop to sync all bookmarks, passwords etc from my old Lenovo Laptop.
    When I set up the account using my old laptop I was given a Sync Key which I stored on my old laptop.
    I then went to my new laptop to enter it as a device. I was given 3 sets of numbers to copy into my old device, which I did. The sync then went ahead successfully, but the new device was never given the Sync Key. So how could it decrypt all the sync'ed information? I can only presume that the sync is not secure, and that it was never encrypted during sync'ing. I not also that my password manager on my new device was not secured with a Master Password, so the passwords must have all been transferred in the clear. This is dreadful if this is really the case

    You should be able to add a device by opening the Firefox Mobile preferences and then scrolling to the Sync section. Press the connect button and you will get a 12 character pass phrase. On your desktop open the options window and then the Sync tab then use the add a device button to enter the 12 character code from your mobile.
    If you are not near your computer you will need the Sync Key that was given to you when setting up Sync.
    http://support.mozilla.com/en-US/kb/find-code-to-add-device-to-firefox-sync

  • My sync key, which i copied off the website, is too long for the firefox home 3 boxes. what should i do?

    i'm trying to create sync between my iphone and desktop.
    i followed instructions to download firefox home from itunes and got a really long sync key: x-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    then went go firefox and to preferences and sync and add a device but the sync key is way too long to go into the 3 boxes.
    what do i do?
    thanks

    You do not have to enter the syn key in the three boxes on that page.<br />
    That is meant for a special code that can be used instead of the user name and sync key for easy set up.<br />
    If you do not have that shorter code then click the link at the bottom "I don't have the device with me" to get a window where you can enter all details.
    * https://support.mozilla.com/kb/How+to+sync+Firefox+between+my+desktop+and+mobile
    * https://support.mozilla.com/kb/find-code-to-add-device-to-firefox-sync

  • I have a sync key, have installed Firefox 28, but it won't recognize my account?

    Ok. Firefox was my main browser on my old laptop, but I ended up having to wipe it's hard drive a few weeks back.
    Before I wiped the hard drive I saved a recovery key. It did not say that I needed an account, just the key, so that is literally all I have. I did not have a firefox account back then. (Note: I'm pretty sure I didn't have an account at least, because when I searched for an account on Firefox with the only two emails that I use it couldn't find an account under either.)
    Now that I'm trying to recover my old data, I've read that I have to download a pre-29 version of Fireox, so I got Firefox 28 mobile, but the damn thing insists that I need a Firefox account ALONG WITH the recovery key to gather the old data. It won't recognize my new account info (that I just made when I downloaded the newest version of Firefox before realizing it wouldn't be able to sync), so now here I am. With a seemingly useless sync key, a useless sync account, and all of my old bookmarks and passwords lost to the ages.
    Is there anything I can do, or should I just give up?

    hello, for the old sync system in firefox 28 and below you also had to sign up with a mail address and password originally - to connect firefox to the old account you would need to have all those three pieces (mail, password & recovery key) available to you unfortunately...

  • Wrong sync key error

    i keep getting wrong sync key error after i click finish on "Setup Complete." i have tried resetting the sync key. nothing works.

    Sync was an Add-on before the release of FF4 after which it was integrated into the current release, so it may behave differently.
    You could maybe consider updating to the current version which is v4.0.1
    To do that, click Help | About Firefox | Check For Updates and then "Apply Update".
    P.S. I'm off on vacation for a month from today so I won't be able to respond again until mid-July. But I'm sure one of the other guys will be able to takeover if the problem persists.

  • Sync Key available but Account is gone.

    I have my old Sync key for the pre version 29 Firefox Sync.
    I believe to have deleted the data associated with it about a week ago. Is there anyway I could restore the data?
    It was in error and I don't recall seeing a confirmation.
    The reason I deleted the data was because I thought I lost my key but I had two and didn't try the newer one.
    I do know how to download the old version to use the old sync and update to the new one so if there is some way to restore the data I would be very glad.
    EDIT: Corrected typo in tite.

    Try using Portable Firefox 28 to make that attempt to recover your data with the "found" Recovery Key.
    You can get it [http://sourceforge.net/projects/portableapps/files/Mozilla%20Firefox%2C%20Portable%20Ed./ >>> here <<<].
    Scroll down to this date - '''2014-03-18'''
    Install it to you hard drive, then see if you can connect to that old Sync account to recover your data. If you can recover your data that way, use Help > About Firefox in that version to get it updated to Portable Firefox 33.1. Then you will need to update your Sync account.
    See this KB article - [[How to update to the new Firefox Sync]]
    I am recommending doing it in that manner because Firefox the password manager was changed drastically a few versions ago, and I'm afraid that if you "go back" with a regular version of Firefox you may not get your passwords back in a usable form or "lose" them when updating to Firefox 33.1. And if you aren't successful you aren't risking messing up your current Firefox installation by messing around with that "go back" so many versions.
    If you are successful recovering your Sync data, you can then connect your current installation to that Sync account to get your data into the new version 33.1 - and then just delete the Portable version.

  • I reformated my PC and lost my sync key and I have my iPhone connected to Sync but cannot find my sync key in the iPhone app

    I have lost my sync key because I reformatted my PC and didn't have a backup of it and my only other device connected to Sync is my iPhone but I cannot access the sync key in the Firefox Home app. I really wish I didn't have to erase all my sync data as I have some important passwords and bookmarks saved only in Sync.

    I did. Safari could not open the show sync key addon and Firefox Home didn't even try to load it for some reason.
    The second addon install button is grey when I try to open it with Firefox Home.
    Thank you, I appreciate the help but I guess unless there's a way to get the sync key for example via sftp from the iPhone (I have jailbroken) I'm pretty much doomed. I tried looking around the Firefox Home app folder but could not find the sync key in there. If someone knows where to look for the key it would be helpful, in case it isn't encrypted.

  • How do I convert the old sync key (12 characters, no dashes) to the new sync key (31 characters, 5 dashes)?

    My sync key used to be 12 characters, no dashes (xxxxxxxxxxxx). After uninstalling and reinstalling FF 3.6.13, Sync 1.6.1 refuses my 12 character sync key.
    I discovered, that sync keys for all users have been switched to 31 characters including 5 dashes (x-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx). How do I get the new sync key?
    I have no PCs connected to Firefox Sync anymore but Firefox Home and 360 Browser on my iPhone sync successfully. Unfortunately on the iPhone I cannot display the currently used sync key. Is there a way to convert the old sync key to the new one?
    I need the bookmarks saved in my Sync account.
    Thanks for your help!

    I had the exact same symptoms you did. Here's my solution:
    I installed an older version of firefox sync (1.4.something, I think) and then added my account using my old short firefox sync key. When trying to sync, the outdated addon said that in order to perform the sync, it needed to be updated. After updating, I was still signed in, but now had the added feature of seeing my new long firefox sync key which was compatible with FF 4b, etc. Everything is working smoothly now and my computer is syncing correctly.

  • Mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114. Will erase local messages, perform full sync.

    Hi
    Does anybody experience similar issues? And if yes do you know if any solution exists?
    I can see often the following logs on the iOS devices:
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1354"
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1357"
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1357
    The result of this error is all the time full re-sync of the iOS device which odd behavior especially if you have large mail file. To me it seems it is connected to the MS Exchange, but the truth is that there is MDM solution in front of Exchange.
    I will be happy for any advice.

    Hi
    Does anybody experience similar issues? And if yes do you know if any solution exists?
    I can see often the following logs on the iOS devices:
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:03 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1354"
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1357"
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |mail db had no sync anchor for account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|EAS|Warn |server returned null sync key for sync of account:78D15F06-D105-4D89-881C-52CE68E274ED, folderID 114.  Will erase local messages, perform full sync.
    Feb 13 08:50:04 Tobiass-iPhone MobileMail[4239] <Notice>: 0x17487c6c0|DA|Error|failed to download body for message "114:1357
    The result of this error is all the time full re-sync of the iOS device which odd behavior especially if you have large mail file. To me it seems it is connected to the MS Exchange, but the truth is that there is MDM solution in front of Exchange.
    I will be happy for any advice.

  • Is my 'secret phrase' the same as my 'sync key'?

    is my sync key the same as my secret phrase?

    Yes, secret phrase was renamed to sync key in Firefox Sync 1.5

  • When I try to sync my desktop with my laptop, which has all my bookmarks in Firefox I get the same boxes for setup. No where is there a place to in put my sync key that I have saved when trying to sync on my laptop I think.

    I put all the details in my question. On neither my desktop nor my laptop does a place pop up for my to enter the sync key that I have saved when I was trying to learn about Firefox and clicked on the sync. At the time I just thought it was for my cell phone which does not have access to the internet. Now that I have saved all my bookmarks from yahoo to Firefox on my laptop. I also want them on my desktop and did not want to go thru what I did on my laptop saving them one at a time. I had to do it this way because I could not get them to import or export or whatever. Besides the last time I checked yahoo had their bookmarks locked up because they are working on them. I could not add nor delete anything in yahoo bookmarks. They are in some transition that will not be complete until the 20th of October and this has been going on since around the beginning of September. So I really would like an easy fix to my problem.

    I know you can't help with my Yahoo problem, however, apparently at some time in the past I have went to the Sync and tried to figure it out on both my laptop and my desktop, because I have the long snyc key information. However, when I go to try to sync both computers I never get the box to enter that key on either one. That is my problem. So should I try and get a new sync key and see if that works.

  • Is there a way to have FF Home remember me, so I don't have to input the sync key, user ID, and password each time? (Perhaps something to do with that "add a device" passcode they completely ignore in the instructions for setting it up?)

    Or is my device just having issues, and it SHOULD remember me each time? It's too much hassle to go copy out my sync key each time from where I've saved it in the Notes app, so I almost never use FF Home - I just google or try to guess addresses in Safari, then bookmark them there. (Can one import bookmarks from Sync to Safari? That would help!)

    Well if you want a "single signon" experience, the Workstation will need to de join to the domain :-)  otherwise it will prompt for the Username and password for authentificaiton.
    You can then check the save password box.
    For remote user that are NOT on the domain, same behavior, you will be prompted to enter Username/Password.
    If a post is helpful, please take a second to hit the green arrow on the left, or mark as answer, thanks.
    Jean-Philippe Breton | Senior Microsoft Consultant | MCTS, MCITP, MCT, Lync MVP

  • My iPhone is asking me for a "sync key". I put in my secret phrase but it didn't work. What do I do?

    On the directions emailed to me, it said to enter my account name, password and secret phrase when I launched the Firefox Home app. But when I launch it it asks me for my account name, password and a "sync key". I put in my secret phrase and it didn't work. What do I put in for my "Sync Key"?

    On the directions emailed to me, it said to enter my account name, password and secret phrase when I launched the Firefox Home app. But when I launch it it asks me for my account name, password and a "sync key". I put in my secret phrase and it didn't work. What do I put in for my "Sync Key"?

Maybe you are looking for