blog as a CSIE student

2019-04-22

Practice


2019-01-14

How to make system field larger

關鍵字/Key words:
text field rezise, text field bigger, aesthetic for SFDC


客製欄位可以在edit mode修改,但如果是系統欄位需要顯示大量字元呢?
例如:描述。

Custom field can modified the # of line in edit mode. But how system field? Such as 'description'

要如何讓該欄位尺寸大到極限?


2019-01-04

Trailhead commonly asked questions: Expecting '}' but was: 'for'

網頁上的程式碼怎麼原樣貼上去,還沒有過?
Why the code can't be save while it's been directly copied and pasted from the Trailhead page?

通常這個問題產生的原因,是因為你把程式碼直接貼在class內,但這種「把內臟攤出來」的做法是不被允許的。
This usually happened due to 'directly paste code inside class', you need to put the logic inside a method.

仔細看一下 trailhead 提供的程式碼,應該是包在 method 內的。
Look the Trailhead page, carefully, the logic should be inside of a method.

你是不是直接沒有複製到 method 的頭尾XD?
There are probably some code that your missing. :P

p.s. 請善用右上角的copy // Use the copy in the up-right corner


2018-06-19

UPDATE: NOW IT HAS!! A reason why Apex doesn't have while-case

更新:在 18" summer release 後,有類似的語法可以使用。
所以這篇基本上也不太需要存在了QQ

關於 「Switch-while Statements」的連結:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_switch.htm




先說我最近K資料得到的重點:while-case 在視覺上比起大量的 if-else 更容易理解,但是 Apex 因其可能存在的 「未定義行為」故不採用。
Staring with my resent note for certification-preparing: while-case is more visual pleasing then parallel-ed, if-else. But the possible "undefined, unwanted behavior" is probably the reason why Apex doesn't have it.

定義:while-case 語法是類C語言中,用來處理大量、等階(相同時間點) if-else 語法時,運用「案例」的觀念,進而折疊、縮短程式碼並增加可讀性的功能。
Define: While-case is a method with the understanding of "case", for C-Like language to shorten and increase readability in code.

而 Apex 語法最主要的存在的目的是提供  SFDC 上的服務,所以在雲端開發、多租戶的前提下,程式碼的行為、記憶體的邊界,比什麼都重要。
Apex, on the other hand, as the main Language on SFDC, with the purpose of cloud development/compiling/execution and with multitenant awareness, guards closely against runaway code by enforcing limits, which prevent code from monopolizing shared resources.



2018-06-13

How to zip file in Mac without hidden files

對應 TrailHead : https://trailhead.salesforce.com/trails/force_com_dev_intermediate/modules/big_objects/units/big_objects_define_custom_big_objects

Mac 在打包檔案(zip)時會自動產生隱藏檔案,使用 terminal 語法進行打包的話就可以避免這個狀況發生,進而避免透過workbench上傳檔案時的「No package.xml found」錯誤。


語法:zip -r zippedfile.zip filefoder -x "*.DS_Store"

不過還是會遇到No package.xml found的錯誤....

2018-06-12

疊床架屋

在開發component時,很容易因為拆太多層所以難以debug。

所以在 TrailHead 的 challenge: https://trailhead.salesforce.com/trails/force_com_dev_intermediate/modules/lex_dev_lc_basics/units/lex_dev_lc_basics_forms

可能會遇到重複coding造成的錯誤,前前後後打滾了三四天,終於摸索出正確寫法,然後就發現有人已經寫過了。

我的理解如下:

2018-06-06

藍牙很難和電腦連線


我目前碰到的狀況是藍牙耳機開啟之後,很難直接和 MacBook 連線,都要開開關關好幾次電腦的藍牙跟耳機的藍芽,然後才有機會連線成功。
但是把 Handoff 取消後,馬上就抓到自動連線了。

蘋果標誌 > 系統偏好設定 > 一般 :取消勾選「允許這部 Mac 和您的 iCloud 裝置之間使用 Handoff 功能」


更多詳細的資料請見資料來源網站: