How do I create an External Id on objects like Profile (for which isCreatable is false). I have to create External Id on Profile for upsert operation, but I am not able to create it.
Is there any work around for this? Or Can we ask salesforce to allow us to create external ids.
Any links or references would be useful!!
Follow up of Create new Profile Object in salesforce?
You can't create external Ids on the metadata components (Profiles, classes, visualforce pages, custom fields). Most of the time they're guarded by having Name or DeveloperName unique. (with addition of namespace but let's ignore managed packages for now)
Profile object doesn't support create but similarly it doesn't support upsert ;) Compare http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_account.htm and http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_profile.htm
I don't understand what exactly are you trying to achieve?
Related
I am utilizing azure data factory upsert salesforce.
I have two tables in salesforce
contacts__c (holds the the individual first and last name )
contactdetails__c (holds additional information about contact)
since I can not use dataflows directly with salesforce (for lookup), I upsert contact__c (sourcesystemid__c hold our internal contact ID).
when trying upsert contactdetails__c, I have to perform a lookup on the fly to know the salesforce internal ID associated for each contact and use that to upsert contactdetails__c.
I saw article suggesting to use contact__r.sourcesystemid__c which doesn't work for me .
I use copy data activity for contactdetails with source being my data in azure sql (with our internal contact ID) and sink is contactdetails__c on the mapping of the contactID I use
source sink
contactid contact__r.sourcesystemid__c
but it doesn't work
would appreciate any suggestion as to how I can lookup internal id of contact while upserting contactdetails table
thanks
Your question is missing a lot of details. I do not know how you are trying to do this, but assuming you are using the REST API then take a look at the section named Upserting Records and Associating with an External ID of this document.
One question... Why are you using custom sObjects for this? Why not use the standard Contact sObject. Also having the data denormalized like you are indicating is a bad idea in Salesforce.
I have a custom object call location and I would like to add an association (many to many) with Account object.
One account can have more than one locations.
I did create a junction object and manage to create many to many relations between account and sales area.
But my question is how can I select the location(s) while creating the new account.
you you are using SF classic, then create VF page and override standard view page with your custom VF page. In this page develop controller that will allow to select location and will create junction object with ids of Account and Location
if you are using lightning experience, then you can develop lightning component and simply add it to Account record page. Server-side controller should have the same functionality as for classic-style version.
I am trying to implement mixpanel to my website. Is generating a user_id via javascript and storing it on the database is the only or recommended way to generate unique user_id. (consult the database to ensure that id's generated are unique) ?
You absolutely don't want to store an ID for each one of your visitors in your database. If you think about tracking all your visitors, you can generate a unique identifier in Javascript (UUID) and store it in a cookie on the user's browser.
Generate UUID : https://stackoverflow.com/a/8809472/3667380
Work with cookies : http://www.w3schools.com/js/js_cookies.asp
or if you prefer using JQuery : http://plugins.jquery.com/cookie/
However, if you want to track your registered users, you should consider using the database to prevent registered users from cleaning their cookies. By using your database, you ensure that every logged in user will always get the same id.
You can abslolutely use the two options together : UUID and cookies for your unregistered visitors and Database ID (hashed maybe) to identify your registered users.
I am currently working on a project whereby I have to make both openERP and SugarCRM talk to each other.
For example, if I add a new Account in SugarCRM, this account is also created in OpenERP...and if I create a new Customer in OpenERP, a new customer with same values is created in SugarCRM.
I've searched the net and I found a connector which allows this interfacing.
http://www.sugarforge.org/projects/sugar2openerp
This connector is not an easy thing to work with...I had to build a module inside SugarCRM for me to input connection details (url, username, password, etc ).
Now, I dont know how to proceed with the connector...the files contained in it mentioned "accounts_cstm"... should I create it or no?
Have you looked at the import_sugarcrm module (http://apps.openerp.com/addon/6970)?
I've never used it, but it is an certified OpenERP module, which means that it is officially supported by OpenERP SA, so you should be able to get support and post feature requests if necessary.
all table names ended with "_cstm" are the upgrade safe portion of the data you create in SugarCRM (_cstm for "custom"). For example if you add a new field to accounts, the original structure doesn't change. SugarCRM creates your new field in this table, and relates to the original accounts table thru id_c field.
I didn't test the module you are mentioning here, but if well constructed there wouldn't be need of creating such table.
I am using Google App Engine with Google's JDO implementation to save an entity for which I wish to provide an URL that a user can navigate to to view information about that entity. The problem I have is that the key generating strategy IdGeneratorStrategy.IDENTITY produces very long keys while the INCREMENT and SEQUENCE strategies are not implemented. I was planning to use the key as part of the URL to link to the entity, however since the only option I have to create a system generated key would result in an unwieldy URL I'm looking for suggestions how how to create a manageable URL to link directly to an entity in my datastore.
Is there any other option other than to create and maintain my own id generator?
Don't use the whole key - just the ID field. You can construct a key from the model name and the ID.