Hi guys,
Could someone pls help me creating a SPE script that check if the Customer record has notes?
Thanks in advance.
Best Regards,
Daniel
Hi guys,
Could someone pls help me creating a SPE script that check if the Customer record has notes?
Thanks in advance.
Best Regards,
Daniel
daniel.gomes what you need is something like this:
Funprog BPC_HAS_NOTES(YBPCNUM) Value Char YBPCNUM Local File NOTE [F:YNTS] Local Integer YHASNOTES : [L]YHASNOTES = [V]CST_ANO Filter [F:YNTS] Where BPCNUM=YBPCNUM If rowcount([F:YNTS])>AVOID.AINT [L]YHASNOTES = [V]CST_AYES Endif LogicClose File [F:YNTS] End [L]YHASNOTES
It returns 2 if the customer as notes, and returns 1 if it doesn't.
I haven't tested, but it should work.
Best Regards
Hi ZPMARCOS,
Thank you, for your help.
I'm new on sage x3 and 4GL development but for testing I create your code on left list of the BPC object and always return 2. Even for customers that doesn't has notes.
Did I make something wrong?
What I really want is to check if customer has notes when creating or updating an record.
"VERIF_CRE" and "VERIF_MOD"
Thanks in advance.
Best Regards,
Daniel
*Community Hub is the new name for Sage City