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 specific field that I am trying to find. The salesforce instance I am in has hundreds of tables/objects so I can't look through them manually.
I also only have read only access, so I can't run an APEX script or create objects. I am using an API to access the database, and store the data outside of salesforce.
What I need is to find the object/table that this field is stored in so I can write an SOQL query to get the field's values. Any ideas?
Easiest way is with Workbench.
This is more like a question for an advice rather than a precise answer...
In my CakePHP app, I will have backend users and frontend members. They have completely different roles and permissions (users are application managers, members are visitors that register on the website without any access to the application backend). Should I use different tables for these two authorization types, or should I just manage them with a role parameter and bind tables to their profiles depending on it, and why is one solution better than the other?
Use the same table and role or type field. You will have only one login and it will be easy to manage the accounts.
Use ACL or a custom permission system to allow them to different controllers/actions.
For permissions, I have 3 ways to do it :
The strict-role way :
Every role of your application has access to functions with their prefix, but not any other prefix.
Ex : admin has access to admin_edit, but not customer_edit
You add a role varchar or enum in your users table, the routing prefixes in Config/core.php and you allow the access in a AppController::beforeFilter : each role is allowed to access to his prefix only.
The hierarchical way:
Your application's roles are ordered in a hierarchical way, where a role has access to his prefix and every prefixes under him.
Ex : admin has access to admin_edit and customer_edit, but
customer has not access to admin_edit
You add a role varchar or enum in your users table, the routing prefixes in Config/core.php and you allow the access in a AppController::beforeFilter by checking for each $this->request->params['prefix'] which roles can has access to it.
The custom way:
You need your admin to access to some functions, but not all. You need another role to access some functions admin can access, and some functions admin cannot.
Ex : admin can access to admin_edit and customer_edit, but not
customer_create or user_stat. customer can have access to
customer_edit, customer_create and user_stat, but not admin_edit or
user_edit
Use ACL. It's not the easiest way to manage permissions into your application, but if you want specific permissions, it's the best way. So remember this : only use ACL if you really need it.
I agree with cornelb: one table only. Here are some additional reasons:
If you add foreign key constraints, it might be messy to make them refer to both the app managers table, and the visitors table. Always when you want to point to a user, you'd need 2 fields, instead of 1 (a field pointing to the managers table, and one to the visitors table — and exactly one of them has to be null). And what if you need 2 user id fields in a row, with foreign keys? Then you'd suddenly need 4 fields. Simper with all keys pointing to just one table (and user type decided by the above-mentioned field).
Sometimes you might want the user id be part of a primary key — but that's more complicated, if you have two different user id fields, one in each table. Because then the database cannot guarantee that each user id is unique — you'd have to do it yourself at the application level.
I understand that the Google AppEngine Data Store changed their default policy on how ID's are auto-generated.
We have application code that expects all ID's to be less than the maximum value for an Integer. In trying to create sample data using the dashboard ("Datastore Viewer"), there is a way to create Entities manually. However when I do this, there appears to be no place to manually set the ID, and the auto-generated ID is larger than the maximum Integer value.
Setting <auto-id-policy>legacy</auto-id-policy> in appengine-web.xml and re-deploying did not seem to help.
I understand when you create Entities programmatically, you can specify your own ID number. Is there any way to do this from the Dashboard, or at least use "legacy" auto-id generation?
No, the Datastore Viewer only allows auto-generated IDs. :(
I need to check if a value has successfully uploaded to a table using C#. The table uses a hash and range. Currently I use a queryrequest->queryresponse->queryresult and then check if the result is null. However the problem with this is that the entire table entry (i.e. all fields) are passed back to the program. This is not sufficiently secure.
I have looked at AWS IAM access policies however I cannot seem to restrict 'getitem' to field level, only to table level.
Any suggestions as to how to have an IAM access policy that only allows users get the hash/range from a table?
I don't think that this is possible via IAM. However, one way to approximate it is to encrypt all fields except for the hash/range.