开发者

Salesforce.com visualforce between 2 objects

开发者 https://www.devze.com 2023-04-02 12:02 出处:网络
In salesforce I need to create a visualforce page that includes the fi开发者_运维问答elds of 2 objects. The first object is the QUOTE object. The second objects is a custom object with several fields.

In salesforce I need to create a visualforce page that includes the fi开发者_运维问答elds of 2 objects. The first object is the QUOTE object. The second objects is a custom object with several fields.

  1. I want to create a visualforce page that shows the records of both QUOTE and the new object. Can I do this without creating a custom controller? If no any hints on the code for this new controller?
  2. Can I do calculations between fields in a visualforce page?
  3. Ideally I want this page to appear as soon as the QUOTE is set to ACCEPTED


1: You can't do this without a custom controller unfortunately, unless one object is related to the other and you're just happy displaying it as a related list on the parent object's page. For calculations you could use rollup summaries for some basic sums etc..

As for a custom controller, have a look at field sets for a super easy way to get fields into a VF page, you essentially configure groups of fields on your objects and then you can stick those groups onto a page with minimal markup.

2: For fields with complex calculations you'll want to do the sums in the controller and then expose the results through variables onto the page in the usual manner.

3: Not really possible without creating a custom edit page in the first place — you'd be better off having a button on the quote page to open up the Visualforce page, that page can simply display an error if the quote is not yet accepted. There are some other alternatives that might work though, like using a forumla field to generate a link to the page when the status is as you desire.

I'm happy to elaborate on any of this, but the fact that you're asking about number 2 would suggest to me that you don't have much experience developing on the platform (not a dig, just an observation), so unless you're comfortable coding in other environments you could find this quite tricky. That said, you're on stackoverflow so I'm thinking you probably know a little about coding at least!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号