How put ContentDocument (Files) related list on external object? (Salesforce) - salesforce

I have external objects and I desire to put the related list files on them, but it doesn't show this option, only custom objects that have relationship with they. How can I achieve that?

Related

SwiftUI Iterate through all possible Views

In Swift, you have views, views, and more views. and i'm trying to make a dynamic list of views that is varied by the files in a group.
Im aware that the groups are not saved on app creation
I cant use Init() in a view because that implies that the view was activated by an outside source (NavigationView for example)
Having a static variable is saved on app startup so i could probably do something like that.
But Essentially i'm trying to be lazy/clever and do something that you can do in java, like iterate through every class in a package and instantiate those objects as you need. I want a NavigationView that's Dynamic, like i can add an Annotation (attribute in this case, but probably not helpful for my problem, just an ides) to my Views, and have a for loop iterate through an array that contains all my possible view objects and give me a navigationView for that.
I COULD just make a Statically configured list of Views ie [v1(), v2(), v3(), v4()...] and just do a ForEach through that and work that way, i just don't want to have to configure that in the main file when i cold probably do it dynamically (if possible) and just write a new class, and at the top put like an annotation and have it auto add to an Array that i'm managing dynamically.
I know you can iterate through files, but files on compile are not in the same structure (no folders etc...) but even if i could i don't know how to do that, and add all vies to a large Set of views for a navigation pane. Like a ForEach of [arr of views] each becoming a navigation link. and i can get the Name of the View by doing View.name or whatever
TLDR:
I want to have my Views Automatically Add themselves to a Static data list (Array of Views probably) and be able to have a navigationView Dynamically just add it to the clickable NavViews and replace this:
With something that is just a loop of all my possible views that i've declared somehow.
Is this possible? if so how would i go about doing something like this
also, i know its probably not the best idea, but for the sake of learning id like to understand how to do this, then maybe a better way of going about what i want so i don't have a centralized place, and i can make it dynamic

Can you use Mongo's populate function with Mongoid

I have a list of Documents which each have a reference to another document in them. I want to sort the parent list based on a property in the referenced document. This seems like an obvious place to use Mongo's populate function but I can't seem to find anything regarding it.

How to retrive perticular contacts only using Contacts API

I have added one custom attribute as "category". It's values should be 'Sales','Support' etc.
I have to retrieve only those contacts who have category as custom attributes.
I tried using below code. But It is not giving the excepted results.
ContactFeed profileFeed = contactService.getFeed(new URL("https://www.google.com/m8/feeds/contacts/"+domain+"/full/?xoauth_requestor_id="+adminEmail+"&start-index="+startIndex+"&q="+searchText),ContactFeed.class);
can anyone tell me ? Is there any way to retrieve only those contacts who have 'Category' as custom attribute.?
Yes its possible, ive done ot before with some tricks. If you include a unique string in the properties, you can then search custom properties. For example prepend # to all your custom properties, then search cor those properties that contain "#". Ive done this from apps script though not fhe raw http api.

How to copy document file from one site to another

I am looking for an example where based on the title name with in the object model I want to copy a single file from one Document library to another. I have more than 2000 files and don't want to loop through to complete collection is there any simple way to accomplish this.
There is no method like GetDocumentByName to use. But when do you want to do this? If you want it triggered by a user, you can use a custom action on the document library and when it's triggered you know what item triggered it.
If you want it done by a job I guess you could create a hidden SPView on the library that filters on the title. I'm not sure it's a great solution, but it can be done at least.

Save error: Initial term of field expression must be a concrete SObject: MAP<String,AcctId__c>

I'm trying to get over a limitation in Salesforce where Lead objects can't have related lists that convert with the Lead over to Opportunity, Contact and Account. I have set up 4 objects of type Lookup Relationship, and created a dummy record in each.
I want to use Custom Settings to store the id of each of these dummy records, so that when the Lead converts, any custom objects can also convert to objects with Master/Detail relationships on the respective standard objects.
My trigger on Lead(after update) tries to create a Map of the Custom Settings:
Map cs = AcctId__c.getAll();
AcctId__c is the Custom Setting api name. Compile time is giving me the above message.
Now, I copied this code directly from the Salesforce documentation. What am I forgetting?
I believe that you must include the actual map definition <String,AcctId__c> after the word Map.
Check out this page.
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_maps.htm

Resources