0

This is my code to Push data to Salesforce Database,

    List<String> fields = new ArrayList<>();
    fields.add("name");
    fields.add("note");
    fields.add("subject");
    fields.add("createdDate");


    smartStoreSDKManager = SmartStoreSDKManager.getInstance();
    UserAccountManager  user = UserAccountManager.getInstance();
    syncManager = SyncManager.getInstance( user.getCurrentUser());

    final SyncOptions options = SyncOptions.optionsForSyncUp(fields, SyncState.MergeMode.OVERWRITE);
    final SyncUpTarget target = new SyncUpTarget();

syncManager.syncUp(target,options,"Note", new SyncManager.SyncUpdateCallback() {
    @Override
    public void onUpdate(SyncState sync) {

    }
});

and im getting this exception

   java.lang.ClassCastException: com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager cannot be cast to com.salesforce.androidsdk.smartsync.app.SmartSyncSDKManager

What am i doing Wrong ? Can anyone Guide me?

0

This Error arised because i copied the salesforce library files from another project , creating a new project by using forcedroid and adding the necessary packages ie)our code package will resolve the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.