문제

I was wondering, In a RemoteAction function in an apex class can or should this be able to access the current force.com site page? I would like to access and write to cookie parameters from within my static remote method but I'm guessing this may not be possible? If not, any suggestions on how to get around this would be useful.

Thanks in advance.

도움이 되었습니까?

해결책

Remote Action method runs in an.asynchronous mode.Hence accessing values from url parameter will get you null values.If you need any static values for your apex class to process use the parameters.pass from page to your apex method using parameter .

There is one way that i recently discovered to do this

Pass them in from the script on the page using {!$currentpage.parameters.something}

You still need to check for nulls in the code because it might legitimately be null

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top