SalesForce: How can I link a custom object field to a value Account record - salesforce

I am trying to find a solution of how to lookup a value on the Account Object and place it in a field on a record of a Custom Object.
Details below:
Objects
Accounts/ Organizations - This contains information on different projects supported by my origination. Key fields of note: Project Name(text) and Account Balance(text). There around 100 unique records in this object These field are manual led created.
Regrant Request - This object contains records that are generated via web form that the projects fill out to receive payment for expenses related to their project. Each Regrant Request record also contains the Project Name(text) Account Balance .
Desired Result:
When a new Regrant Request record is generated from the web form, it will take the value of the Project Name, match it with a record in the Accounts/Organization object. Once the link has been made, I would like to take the value of the Account Balance in the Accounts/ Organizations Object and copy to the Regrant Request record.
The problem that I am trying to solve is that in order a project to be paid the amount of money they request in the regrant request, they have to have enough funds. It would be great if I did not have to leave the regrant request record to find this value.
I know that I have to tie each regrant request record to an account id. That is stright forward but I am stuck on how to then get a value of field for said account id and then copy to a custom object.
any ideas would be extremely helpful!

I found out how to use zapier to do a search of the account object using the value of field inputted via the online form. So cool !

Related

Integrate Salesforce with Salesforce

I'm trying to get updated account records from a Salesforce organization pushTopic subscription and trying to add the changes in another Salesforce organization. If the second organization already has the particular account, it should be updated else it should be create as new account. For this scenario I need to check the second organization account with first organization account records. How can we do it since Salesforce doesn't have unique key other than record id?
Create a big object which will hold the first organization record Id with the equivalent new org record Id. Through this, you will get to know the records which are already inserted.
If the record Id is not present in the big object which means that you need to create a new record and create one more big object record with a new record Id and old record Id (for further checking).
You can use custom object as well but the optimal solution could be creating a big object.

Google Data Studio: Filter report data through parameter in URL

I have a Google sheet where each row contains data for a single person.
First column is an alphanumeric random id.
Is there any way I can build a personal score card report which I can share with each person through a link?
The link would contain a parameter for filtering the datasource by the id column. I mean sharing by sending links via email, for example:
Send an email to John with the following link: <url>?id=kfdjfhdfljdshfsdkj
Send an email to Mark with the following link: <url>?id=fdyfdhfsfjsdkjfksd ….
I have thought about adding a filter control plus enabling bookmark urls, but would like to avoid that as that would be a possible security breach. Other ideas?
Thanks
If you can put your data in BigQuery, an alternative approach is to use authorised views. It is explained in details in How To Control Access To BigQuery At Row Level With Groups
The filter based on the email address feature can be implemented by adding an email address field alongside the existing field(s), such as alphanumeric random id in the Google Sheet.
Once that's done, connect the Google Sheets Data Source to Google Data Studio, and then at the Data Source, filter based on the email address of the respective user ID (filter located on the upper left of the Data Source section).

Salesforce Lookup Object Relationships

I have a number of objects that contains references to other objects in Salesforce. An example is that a Shipping is the parent object related to ShippingItem by the shippingId. In order to save ShippingItems I need to get the ShippingId of the Shipping object. Also, the ShippingItems are related to ShippingMethod object which contains the shipping methods, UPS, FEDEX etc. This is a picklist type that allows users to pick the shipping method. In order to create/save the ShippingItem. I need to obtain all the related fields, i.e. ShippingMethod i.e UPS, ShippingId to which it is related and other similar information. How can I obtain these fields in order to save the ShippingItems? When I inspect the Objects, I am unable to determine the fields to query in order to obtain the related information.
Please help
If I understood this correctly, ShippingItem has a lookup to Shipping and a lookup to ShippingMethod. Are you providing a UI where people create ShippingItems? If yes then ShippingID and ShippingMethodID should be populated on the shipping record when you get the record back in controller.
If your question is how to provide a list of ShippingMethod records on the UI for users to select, you can query the object records separately and create a picklist for the user to choose.
Adding a little more information or code snippet will help you get better answers.

Implement a form in Salesforce

I am currently the Salesforce administrator of a company Enterprise account. Our accounts are made up of universities. I was asked to implement a form for trips.
The trips basic information is: Trip name, University, Region, Country, Project manager and Project manager met. I created the object trip and added the custom fields using lookup relationships with contacts and accounts. This was very easy to do so.
The first problem is as we move through the form. The next section is about the university info which has these fields: Number of students, Number of faculty, Language. They are asking me that these fields override the information that was previously stored in the account. Like if you pick X university and it had 200 students originally, then if I write 205 in the field , it will overwrite the previously set number.
My second problem is, in the next section of the form they have an objectives section.
For example, there is a text field with the label :
"Objective 1 ___________" +
if you want to add a new objective there is a "+" sign that will create a new field
"Objective 1 ___________" +
"Objective 2 ___________"
How can I achieve this? Is there a way with basic creating system? Do I need to create a Visualforce page? Thank you for your help.
This is what I understand of your 1st problem: On the trip object you have a lookup to account (university) and there are number of students etc field on the trip object and whenever a user updates it here it should be update back in the Account Object?
Instead of doing this, as you're already capturing all this data in the account object, use formula fields in the trip object to populate the data. This i think would be a better data model. But if you still wish to do it the way you intend to then you will have to write a trigger on trip object and update the account with that information. The problem with the second option would be: lets say you create a trip 1 record and update the #of students to 210, and this would be updated in the account as 210. And then you create a trip2 record for the same account and here you input the value of the #of Students field to 230, so the account(university) record with the value 230. But the problem is the value in trip 1 record will still remain 210. I hope you understand what I am trying to explain.
Coming to the 2nd Problem:
Here too the data model will be slightly different:
Create another object called Objective which has a master detail relationship with the trip object. So the Objective will be a related list in the trip object. For every trip there will be a number of objective which you can add in the related list. This is quite simple and there would be no need of any coding. But if you want to add the + sign which would display another field when the user clicked on it: In this case too the data model is the same, but you would need to create a VF page(which could either in-line VF page or a entirely an independent VF page) and then whenever a user clicks the + sign a new field is shown.

Create multiselect lookup in salesforce using apex

I want to create a multi-select Contact Lookup.
What i want :
When user clicks on a lookup then he should be able to select multiple contacts from that.
What i have done:
I have created an object and a field inside that object using both
"Lookup" and
"MasterDetail Relationship" and
"Junction Object"
When i try to use this Field for any input text/Field then it always provides an option to select only one value from lookup but i want to have an option to select multiple.
Even in the Junction object i have created 2 master-detail relationships still lookup allows only one value to be selected.Moreover it makes the field mandatory which i don't want.
Links that i followed:
http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC
https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&section=help&hash=topic-title&target=relationships_manytomany.htm
Can anybody suggest me how to do this.
Its same as we use Email CC/BCC under Send Email option for any Lead.
Even you use a junction object a lookup is just that, it references (looks up to) one other record: when you create a record on the junction object you still have to set each lookup individually and you're still creating only one record.
Master Detail relationships are essentially lookups on steroids, one object becomes the child of the other and will be deleted if the parent object is deleted, they're not going to provide an interface to lookup to many records at once.
If you're not a developer then your best bet is to either just create on junction object record at a time, or look into using dataloader. You could prepare your data in Excel or similar and then upload all the records into Salesforce in one go.
If you are a developer, or have developers at your disposal, then what we've done in the past is create a Visualforce page to do the job. So if, for example, you wanted to link a bunch of contacts up to an Account, we'd have a single account lookup field on the page, then some search fields relating to fields on the contact. Using a SOQL query you can then find all contacts matching the search parameters and display them in a list, where you may want to provide checkboxes to allow the user to select the contacts they want. Then it's just a case of looping through the selected contacts, setting their Account field to be the chosen account.
There are areas in Salesforce (such as the send Email functionality you mentioned) where it's clear to see that bespoke work has been done to fulfil a specific task — another instance of what you want is in the area where you can manage campaign members. This is the model I've copied in the past when implementing a Visualforce page as described.
Good luck!
For adding multiple junction objects at one time, the only solution we have found is a custom Visualforce page, as described by LaceySnr.
For a slightly different problem, where we need to assign many of object B to object A, We have trained our users to do this with a view on object B. We are assigning Billing Accounts (B) to Payment Offices (A). The view on Billing Account has check boxes on the left side. The user checks the Billing Accounts to be assigned, then double-clicks on the Payment Office field on any of the checked rows. A pop-up asks if you want to update only the single row or all checked rows. By selecting 'all checked rows', the update is done to all of them.
The view is created by the user, who enters the selection criteria (name, address, state, etc.). All user-created views are visible only to them.

Resources