Timeline for Saving Opportunity and related Contact from single Visualforce page
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 30, 2015 at 2:32 | comment | added | David Leckenby | Thanks for getting back to me Matt. I have now solved it. I changed the assignment query to 'cont = [SELECT Id, Rating__c, Name, Lead_Source__c, MobilePhone FROM Contact WHERE Name =: acct.Name LIMIT 1];' and my visualforce call to '<apex:inputField value="{!cont.Rating__c}"/>' and it all worked. Thanks again | |
Apr 30, 2015 at 0:22 | comment | added | Matt Lacey♦ | The best bet is to edit the question, but I suspect you don't have the rep for that. If you can't, post it as a comment and I'll do it for you. | |
Apr 29, 2015 at 23:58 | comment | added | David Leckenby | There is only one visualforce page which has a standard opportunity controller and the controller extension shown above. Could I post you the page to look at? If so, where would be the best place to do that, in this comment field? | |
Apr 24, 2015 at 4:26 | comment | added | Matt Lacey♦ | Is the page writing to that contact object which is initiated in the controller? Looks like it should be working, just make sure you're not creating a new contact in memory on save. | |
Apr 24, 2015 at 4:20 | comment | added | David Leckenby | Hi Matt. I have worked more on this issue but still have not succeeded in being able to update the contact object (the opportunity saves no problem). I have with your assistance added a query statement that enables me to acquire the correct contact id, but I still cannot mange to update any contact fields on the visualforce page? | |
Apr 23, 2015 at 7:37 | comment | added | David Leckenby |
Many Thanks Matt! Our org is not configured for Personal Accounts (even though they use Business and Personal Account record types). Anyhow I think what you suggested is right about querying the contact. So I declared and instantiated an Account object and then added the following code acct.id = oppt.AccountId; cont.Id = [SELECT Contact.id FROM Contact WHERE Contact.Name = Account.Name]; I am now getting an invalid binding expression error....Thanks so much for your help :)
|
|
Apr 23, 2015 at 3:52 | history | answered | Matt Lacey♦ | CC BY-SA 3.0 |