• Rajat Majumder
  • NEWBIE
  • 20 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

Can we use method() from other apex classes into the VF page directly and by not using the controller of that VF page?


In Java, we can use packages and do so, but I have no idea what to do with the apex and VF Page.


I would be thankful if anyone with the knowledge can help me out with this doubt.

string hybrisURL=URL+'OppId='+oppId+'&Country='+country+'&Lang='+lanag+'&Status=Approved&QuoteId='+quoteId;

As mentioned above is URL is used for a certain function. But when the URL is redirected the character '&' changes to '&'.

And this is creating a problem for me. It is showing the error code 404 page can't be found. With '&' character the page is working fine.

How to resolve the issue? How to restrict the characters from changing?

 

I have a situation where I have two objects Opportunity and a custom Object Contract__c. In both the object I have a field called reference_name__c. Now the situation is that I have to query the objects and return the reference_name__c values. If Opportunity has reference_name__c value and Contract__c don't have reference_name__c value return value. If Opportunity has no reference_name__c value and Contract__c has reference_name__c value then return the value. How could I write the query? The query was written by me just satisfies the 1st condition. Please help me with the query.


Select Id, reference_name__c,(Select ID, reference_name__c from Contract__r where reference_name__c !=null Limit 10) from opportunity where AccountId != null AND reference_name__c != null AND Owner.AccountId =loggedInUser.Contact.AccountId limit 10

string hybrisURL=URL+'OppId='+oppId+'&Country='+country+'&Lang='+lanag+'&Status=Approved&QuoteId='+quoteId;

As mentioned above is URL is used for a certain function. But when the URL is redirected the character '&' changes to '&'.

And this is creating a problem for me. It is showing the error code 404 page can't be found. With '&' character the page is working fine.

How to resolve the issue? How to restrict the characters from changing?